rray ((2,2), object)
>>> a.flat [2] = (1, 2, 3)
>>> a.flat [2]
1
>>> a
array([[None, None],
[1, None]], dtype=object)
Is this a feature? Wouldn't a naive user like me expect
a.flat [2] == (1, 2, 3)?
Thanks in advance,
Martin Wiechert
--
On Thursday 21 September 2006 18:24, Travis Oliphant wrote:
> Martin Wiechert wrote:
> > Thanks Travis.
> >
> > Do I understand correctly that the only way to be really safe is to make
> > a copy and not to export a reference to it?
> > Because anybody having a r
:
> Martin Wiechert wrote:
> > Hi list,
> >
> > I just stumbled accross NPY_WRITEABLE flag.
> > Now I'd like to know if there are ways either from Python or C to make an
> > array temporarily immutable.
>
> Just setting the flag
>
> Python:
>
>
Hi list,
I just stumbled accross NPY_WRITEABLE flag.
Now I'd like to know if there are ways either from Python or C to make an
array temporarily immutable.
Thanks, Martin.
-
Take Surveys. Earn Cash. Influence the Future of
On Tuesday 19 September 2006 20:37, Travis Oliphant wrote:
> Martin Wiechert wrote:
> > Hi list,
> >
> > Please forgive my ignorance: Is there any difference between npy_intp and
> > size_t. Aren't both "ints just big enough to be safe with pointer
> &g
Hi list,
Please forgive my ignorance: Is there any difference between npy_intp and
size_t. Aren't both "ints just big enough to be safe with pointer arithmetics
even on 64 bit architectures?".
Thanks,
Martin.
-
Take Survey
On Monday 18 September 2006 20:46, Travis Oliphant wrote:
> Martin Wiechert wrote:
> > Hi list,
> >
> > does anybody know, if in C in the PyArray_Descr struct it is safe to
> > manually change descr->elsize and descr->alignment as long as these are
> > compa
Hi list,
does anybody know, if in C in the PyArray_Descr struct it is safe to manually
change descr->elsize and descr->alignment as long as these are compatible and
descr->elsize is large enough to hold all fields? Of course I mean before any
array is constructed using descr.
Thanks, Martin.
On Sunday 17 September 2006 00:36, Travis Oliphant wrote:
> Martin Wiechert wrote:
> > Hi list,
> >
> > Apparently r_[x,x] does not necessarily have the same dtype as x:
> >>>> from numpy import *
> >>>> dt = dtype ([('a',
Hi list,
Apparently r_[x,x] does not necessarily have the same dtype as x:
>>> from numpy import *
>>> dt = dtype ([('a', 'b'), ('f4', 'i4')])
>>> x = zeros ((1,), dt)
>>> x.dtype
dtype([('a', '|i1'), ('f4', '>> r_[x,x].dtype
dtype('object')
>>>
>>> import numpy
>>> numpy.version.version
'1.0rc1.
On Friday 15 September 2006 20:27, Travis Oliphant wrote:
> Martin Wiechert wrote:
> > On Friday 15 September 2006 19:14, Travis Oliphant wrote:
> >> Martin Wiechert wrote:
> >>> Thanks Albert! Do you also know the corresponding C-API function? It
> >>>
On Friday 15 September 2006 20:05, Travis Oliphant wrote:
> Martin Wiechert wrote:
> > Hi list,
> >
> > I'm using PyArray_DescrConverter with a dict object to create a
> > "struct-like" dtype from C.
> > As the struct contains different data types I
On Friday 15 September 2006 19:14, Travis Oliphant wrote:
> Martin Wiechert wrote:
> > Thanks Albert! Do you also know the corresponding C-API function? It
> > cannot be PyArray_DescrConverter (PyObject *, PyArray_Descr **), whose
> > signature has no "align"
y
> Docstring:
>
>
Thanks Albert! Do you also know the corresponding C-API function? It cannot be
PyArray_DescrConverter (PyObject *, PyArray_Descr **), whose signature has no
"align", right?
> Cheers,
>
> Albert
>
> > -Original Message-
> > From: [EMAIL P
On Friday 15 September 2006 16:40, Francesc Altet wrote:
> A Divendres 15 Setembre 2006 16:13, Martin Wiechert va escriure:
> > Hi list,
> >
> > I'm using PyArray_DescrConverter with a dict object to create a
> > "struct-like" dtype from C.
> > A
On Friday 15 September 2006 16:13, Martin Wiechert wrote:
> Hi list,
>
> I'm using PyArray_DescrConverter with a dict object to create a
> "struct-like" dtype from C.
> As the struct contains different data types I run into "unaligned access"
> probl
Hi list,
I'm using PyArray_DescrConverter with a dict object to create a "struct-like"
dtype from C.
As the struct contains different data types I run into "unaligned access"
problems.
Is there a way to force alignment or to get trailing unused bytes in the
dtpye?
Thanks, Martin
-
ppreciated.
Regards,
Martin Wiechert
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Applicatio
Hi all,
is it just me, or is matrixmultiply missing from numpy1.0b?
>>> import numpy
>>> numpy.version.version
'1.0b1'
>>> numpy.matrixmultiply
Traceback (most recent call last):
File "", line 1, in ?
AttributeError: 'module' object has no attribute 'matrixmultiply'
Thanks Martin.
---
Hi all,
for me
M [ix_(I, J)]
does not work if I, J are boolean arrays. Is this intended or a bug/missing
feature?
And is there a way (other than I = where (I) [0] etc.) to make it work?
Thanks,
Martin
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done qu
Hi list,
does anybody know, why
maximum.reduce (())
does not return -inf?
Looks very natural to me and as a byproduct maximum.reduce would ignore nans,
thereby removing the need of nanmax etc.
The current convention gives
>>> from numpy import *
>>> maximum.reduce ((1,nan))
1.0
>>> maximum.r
Thanks Pau, that's exactly what I was looking for.
Martin
On Wednesday 14 June 2006 12:01, you wrote:
> On 6/14/06, Martin Wiechert <[EMAIL PROTECTED]> wrote:
> > Hi Simon,
> >
> > thanks for your reply.
> >
> > A [I, J]
> >
> > seems to o
whole rectangle IxJ but only the elements (I_1, J_1), (I_2, J_2).
E.g., if I==J this is the diagonal of the submatrix, not the full submatrix.
Martin
On Wednesday 14 June 2006 20:25, Simon Burton wrote:
> On Wed, 14 Jun 2006 11:14:17 +0200
>
> Martin Wiechert <[EMAIL PROTECTED]>
Hi list,
is there a concise way to address a subrectangle of a 2d array? So far I'm
using
A [I] [:, J]
which is not pretty and more importantly only works for reading the
subrectangle. Writing does *not* work. (Cf. session below.)
Any help would be appreciated.
Thanks,
Martin
In [1]:a = z
24 matches
Mail list logo