Re: [Numpy-discussion] numpy log and exceptions

2014-10-22 Thread Daniel Hyams
Julian Taylor googlemail.com> writes: > What platform are you using? > whether you get exceptions or not depends on your math library. > Windows 7. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/n

[Numpy-discussion] numpy log and exceptions

2014-10-21 Thread Daniel Hyams
I would have thought that this snippet would raise an exception: import numpy numpy.seterr(all='raise') a = numpy.array([1.0,0.0,-1.0]) b = numpy.log(a) I get as a result (in b): [0, -Inf, NaN] It's basically the same issue as: http://numpy-discussion.10968.n7.nabble.com/numpy-log-does-not-rai

Re: [Numpy-discussion] Bug in pickling an ndarray?

2012-06-30 Thread Daniel Hyams
which is what I already had done, but the inconsistent behavior across versions and platforms made me think it was a bug). Thanks again for the clear explanation of what is going on. On Sat, Jun 30, 2012 at 6:33 PM, Daniel Hyams wrote: > Hmmm, I wouldn't think that it is correct behav

Re: [Numpy-discussion] Bug in pickling an ndarray?

2012-06-30 Thread Daniel Hyams
g to resize the array, which you cannot do if the data is not really owned by that array...I had explicit check for myarray.base==None, which it is not when I get the ndarray from a pickle. -- Daniel Hyams dhy...@gmail.com ___ NumPy-Discussion mai

[Numpy-discussion] Bug in pickling an ndarray?

2012-06-30 Thread Daniel Hyams
on__ #import pickle dset = numpy.ones((2,2)) print "BEFORE PICKLING" print dset print "base = ",dset.base print dset.flags # pickle. s = pickle.dumps(dset) # now unpickle. dset = pickle.loads(s) print "AFTER PICKLING AND THEN IMMEDIATELY UNPICKLING" print dset print &quo

[Numpy-discussion] Taking a large number of dot products at once

2011-03-03 Thread Daniel Hyams
This is probably so easy, I'm embarrassed to ask it...but I've been casting around trying things to no avail for the last hour and a half, so here goes... I have a lot of dot products to take. The length-3 vectors that I want to dot are stacked in a 2D array like this: U = [u1 u2 u3] and V