
a=numpy.array(list('foabcdeef'),dtype=numpy.dtype("O")) numpy.equal(a,'f')
NotImplemented
So where do I start implementing this ? core/src/ufuncobject.c ?
Simon.

On 3/30/06, Simon Burton simon@arrowtheory.com wrote:
a=numpy.array(list('foabcdeef'),dtype=numpy.dtype("O")) numpy.equal(a,'f')
NotImplemented
So where do I start implementing this ? core/src/ufuncobject.c ?
Yes,
879 if (PyTypeNum_ISFLEXIBLE(arg_types[i])) { 880 loop->notimplemented = 1; 881 return nargs; 882 }
(line numbers from r2310)

Simon Burton wrote:
a=numpy.array(list('foabcdeef'),dtype=numpy.dtype("O")) numpy.equal(a,'f')
A couple of things:
1) dtype=numpy.dtype("O") is equivalent to dtype="O"
2) Because you have an object array this should work. You can work around the bug using numpy.equal(a,array('f','O'))
-Travis
participants (3)
-
Sasha
-
Simon Burton
-
Travis Oliphant