Re: [Numpy-discussion] better error message possible?

2012-06-05 Thread Thouis Jones
On Mon, Jun 4, 2012 at 11:49 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Jun 4, 2012 at 10:00 PM, Thouis (Ray) Jones tho...@gmail.com wrote: On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones tho...@gmail.com wrote: I could look into this.  There are only ~10 places the code generates

Re: [Numpy-discussion] better error message possible?

2012-06-05 Thread Thouis Jones
On Tue, Jun 5, 2012 at 12:15 PM, Thouis Jones thouis.jo...@curie.fr wrote: On Mon, Jun 4, 2012 at 11:49 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Jun 4, 2012 at 10:00 PM, Thouis (Ray) Jones tho...@gmail.com wrote: On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones tho...@gmail.com wrote

Re: [Numpy-discussion] .max(0) on reshaped array returns inconsistent results.

2012-05-25 Thread Thouis Jones
On Fri, May 25, 2012 at 1:52 PM, Nathaniel Smith n...@pobox.com wrote: On Fri, May 25, 2012 at 12:46 PM, Thouis (Ray) Jones tho...@gmail.com wrote: I'm seeing some strange behavior from .max() on a reshaped array in the current master, and wanted to raise it here to make sure it's not

Re: [Numpy-discussion] .max(0) on reshaped array returns inconsistent results.

2012-05-25 Thread Thouis Jones
On Fri, May 25, 2012 at 2:07 PM, Thouis Jones thouis.jo...@curie.fr wrote: I don't seem to be able to reproduce with just a.max(0) or np.array(a.max(0), np.float), but since it seems to be very unstable to other changes in the code, I'll keep trying to find out if I can make those simpler

[Numpy-discussion] tracing numpy data allocation with python callbacks

2012-05-16 Thread Thouis Jones
I recently had need of tracing numpy data allocation/deallocation. I was unable to find a simple way to do so, and so ended up putting the code below into ndarraytypes.h to allow me to trace allocations. A key part is that this jumps back into python, so I can inspect the stack and find out

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-05 Thread Thouis Jones
On Fri, Dec 2, 2011 at 18:53, Charles R Harris charlesr.har...@gmail.com wrote: After sleeping on this, I think an object array in this situation would be the better choice and wouldn't result in lost information. This might change the behavior of some functions though, so would need testing.

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Thouis Jones
On Thu, Dec 1, 2011 at 15:47, Pierre Haessig pierre.haes...@crans.org wrote: Le 01/12/2011 14:52, Thouis (Ray) Jones a écrit : Is this expected behavior? np.array([-345,4,2,'ABC']) array(['-34', '4', '2', 'ABC'], dtype='|S3') With my numpy 1.5.1, I got indeed a different result: In [1]:

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Thouis Jones
On Thu, Dec 1, 2011 at 16:29, Benjamin Root ben.r...@ou.edu wrote: Does the same problem occur if -345 comes after ABC? Yes. np.array(list(reversed([-345,4,2,'ABC']))) array(['ABC', '2', '4', '-34'], dtype='|S3') ___ NumPy-Discussion mailing