Re: [Numpy-discussion] numpy.fromstring() : error handling ?

2008-08-08 Thread Christopher Barker
oc-spam66 wrote: > Is it really how it should be ? > > I thought this method should be restrictive in what it accepts (because > the goal is to fill an array with precise dimensions). if you know how big an array you want, then you should use the "count" keyword: np.fromstring("45.6 76.4", dty

Re: [Numpy-discussion] C-API change for 1.2

2008-08-08 Thread Jarrod Millman
On Fri, Aug 8, 2008 at 7:22 PM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > The 1.2 version of NumPy is going to be tagged. There is at least one > change I'd like to add: The hasobject member of the PyArray_Descr > structure should be renamed to "flags" and converted to a 32-bit > integer.

[Numpy-discussion] C-API change for 1.2

2008-08-08 Thread Travis E. Oliphant
Hi all, The 1.2 version of NumPy is going to be tagged. There is at least one change I'd like to add: The hasobject member of the PyArray_Descr structure should be renamed to "flags" and converted to a 32-bit integer. What does everybody think about this change? It should have minimal

Re: [Numpy-discussion] numpy.fromstring() : error handling ?

2008-08-08 Thread oc-spam66
> > Shouldn't it raise an exception ValueError ? (because "abcd" is not a float) > > I don't think so, but it shouldn't return a zero either. > > That call should mean: scan this whitespace separated string for as many > floating point numbers as it has. There are none, so it should return > a

Re: [Numpy-discussion] numpy.fromstring() : error handling ?

2008-08-08 Thread Christopher Barker
oc-spam66 wrote: > I am now disturbed by this result : > > > In [1]: import numpy > > In [2]: numpy.fromstring("abcd", dtype = float, sep = ' ') > > Out[2]: array([ 0.]) > > Shouldn't it raise an exception ValueError ? (because "abcd" is not a float) I don't think so, but it shouldn't return

Re: [Numpy-discussion] Appending data to a big ndarray

2008-08-08 Thread Travis E. Oliphant
oc-spam66 wrote: > Hello, > > I would like to build a big ndarray by adding rows progressively. > > I considered the following functions : append, concatenate, vstack and > the like. > It appears to me that they all create a new array (which requires > twice the memory). > > Is there a method for

[Numpy-discussion] Appending data to a big ndarray

2008-08-08 Thread oc-spam66
Hello, I would like to build a big ndarray by adding rows progressively. I considered the following functions : append, concatenate, vstack and the like. It appears to me that they all create a new array (which requires twice the memory). Is there a method for just adding a row to a ndarray w

Re: [Numpy-discussion] unique1d returning indices

2008-08-08 Thread Stéfan van der Walt
Hi Robert 2008/8/6 Robert Cimrman <[EMAIL PROTECTED]>: > Note also that the order of outputs has changed (previously unique1d() > returned (i, b) for return_index=True). Does this not constitute an API change? Stéfan ___ Numpy-discussion mailing list N

Re: [Numpy-discussion] numpy.fromstring() : error handling ?

2008-08-08 Thread oc-spam66
Thank you for the answers, I am now disturbed by this result : > In [1]: import numpy > In [2]: numpy.fromstring("abcd", dtype = float, sep = ' ') > Out[2]: array([ 0.]) Shouldn't it raise an exception ValueError ? (because "abcd" is not a float) Regards, O.C. Créez votre adresse électroni

[Numpy-discussion] ATTENTION: 1.2.0b1 tagged tomorrow

2008-08-08 Thread Jarrod Millman
Just a reminder: I will be tagging 1.2.0b1 tomorrow evening. -- Jarrod Millman Computational Infrastructure for Research Labs 10 Giannini Hall, UC Berkeley phone: 510.643.4014 http://cirl.berkeley.edu/ ___ Numpy-discussion mailing list Numpy-discussion