[Tutor] An -1.#IND error

Dinesh B Vadhia dineshbvadhia at hotmail.com
Mon Jan 28 04:29:55 CET 2008


This is literally the core of the code:

A = scipy.asmatrix(scipy.zeros((M, N), float))
q = scipy.asmatrix(scipy.zeros((N, 1)), float)
b = scipy.asmatrix(scipy.zeros((1, N)), float)

# populate A
# x is a vector of valid floats (I've checked)
# calculate b as:

b = A * x

After the matrix multiplication, the b vector elements are all "-1.#IND" 's.  Note that there are no divisions by zero in the program.



----- Original Message ----- 
From: Luke Paireepinart 
To: Dinesh B Vadhia 
Cc: tutor at python.org 
Sent: Saturday, January 26, 2008 11:12 PM
Subject: Re: [Tutor] An -1.#IND error

Dinesh B Vadhia wrote:
> After a matrix*vector multiplication (ie. b = Ax, with A, x and b all 
> floats), the b vector elements are all "-1.#IND".  What does this 
> mean?  Btw, they are no divisions in the program eg. no divide by zeros.
A code sample would be _much_ more helpful here.
Please include one that exhibits the problem.
> Dinesh
> ------------------------------------------------------------------------
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080127/72b4c7c7/attachment.htm 

More information about the Tutor mailing list