LinAlgError numpy

asked 2014-02-13 01:43:21 -0500

Agustin Haller gravatar image

updated 2014-02-13 13:12:01 -0500

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

Thank you very much!

Comparing both outputs (from local and prod environments) i notice the error is produced in (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 +, (Xi-meanClass).T)
        Sb = Sb + Xi.shape[1] * - 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!

edit retag flag offensive close merge delete