Re: [Numpy-discussion] Non-writeable default for numpy.ndarray

2006-10-01 Thread Francesc Altet
El dv 29 de 09 del 2006 a les 16:27 -0600, en/na Travis Oliphant va escriure: Francesc Altet wrote: I see. Thanks for the explanation. You deserve the thanks for the great testing of less-traveled corners of NumPy. It's exactly the kind of thing needed to get NumPy ready for

[Numpy-discussion] Non-writeable default for numpy.ndarray

2006-09-29 Thread Francesc Altet
Hello, Is the next a bug a feature? In [102]: f4=numpy.ndarray(buffer=a\x00b*4, dtype=f4, shape=3) In [103]: f4 Out[103]: array([ 2.60561966e+20, 8.94319890e-39, 5.92050103e+20], dtype=float32) In [104]: f4[2] = 2

Re: [Numpy-discussion] Non-writeable default for numpy.ndarray

2006-09-29 Thread Tim Hochberg
Francesc Altet wrote: Hello, Is the next a bug a feature? In [102]: f4=numpy.ndarray(buffer=a\x00b*4, dtype=f4, shape=3) In [103]: f4 Out[103]: array([ 2.60561966e+20, 8.94319890e-39, 5.92050103e+20], dtype=float32) In [104]: f4[2] = 2

Re: [Numpy-discussion] Non-writeable default for numpy.ndarray

2006-09-29 Thread Francesc Altet
A Divendres 29 Setembre 2006 18:12, Tim Hochberg va escriure: It's not that the it's being built from ndarray, it's that the buffer that you are passing it is read only. In fact, I'd argue that allowing the writeable flag to be set to True in this case is actually a bug. Consider this

Re: [Numpy-discussion] Non-writeable default for numpy.ndarray

2006-09-29 Thread Travis Oliphant
Tim Hochberg wrote: Francesc Altet wrote: It's not that the it's being built from ndarray, it's that the buffer that you are passing it is read only. This is correct. In fact, I'd argue that allowing the writeable flag to be set to True in this case is actually a bug. It's

Re: [Numpy-discussion] Non-writeable default for numpy.ndarray

2006-09-29 Thread Tim Hochberg
Travis Oliphant wrote: Tim Hochberg wrote: Francesc Altet wrote: It's not that the it's being built from ndarray, it's that the buffer that you are passing it is read only. This is correct. In fact, I'd argue that allowing the writeable flag to be set to True in this

Re: [Numpy-discussion] Non-writeable default for numpy.ndarray

2006-09-29 Thread Travis Oliphant
Francesc Altet wrote: I see. Thanks for the explanation. You deserve the thanks for the great testing of less-traveled corners of NumPy. It's exactly the kind of thing needed to get NumPy ready for release. -Travis