Ask Your Question

Revision history [back]

LinAlgError numpy

This is weird.

Im having this error in the production environment but not in my local environment. image description

image description

image description

Does anyone know what may be the error? Why i'm getting those "nan's"?

You can check this at http://ec2-54-200-156-31.us-west-2.compute.amazonaws.com/

Thank you very much!

LinAlgError numpy

This is weird.

Im having this error in the production environment but not in my local environment. image description

image description

image description

Does anyone know what may be the error? Why i'm getting those "nan's"?

You can check this at http://ec2-54-200-156-31.us-west-2.compute.amazonaws.com/

Thank you very much!

Comparing both outputs (from local and prod environments) i notice the error is produced in features.py (from facerec python library) in this portion of the code:

    # calculate the within and between scatter matrices
    Sw = np.zeros((d, d), dtype=np.float32)
    Sb = np.zeros((d, d), dtype=np.float32)
    for i in range(0,c):
        Xi = XC[:,np.where(y==i)[0]]
        meanClass = np.mean(Xi, axis = 1).reshape(-1,1)
        Sw = Sw + np.dot((Xi-meanClass), (Xi-meanClass).T)
        Sb = Sb + Xi.shape[1] * np.dot((meanClass - meanTotal), (meanClass - meanTotal).T)

That code is being processed differently in prod and local environments.

By the way, I'm running python 2.7.6 using GCC 4.2.1 on osx in my local environment. And i'm running python 2.7.3 using GCC 4.6.3 on ubuntu 12.04 in my prod environment. (in an amazon ec2 micro instance)

Does anyone know which may be the difference in the numpy behavior? Any help is appreciated!