[pypy-dev] partition in numpypy

Sergey Matyunin sergeymatyunin at gmail.com
Sat Jan 23 11:24:07 EST 2016


Hello.

Need a little help with numpypy. I want to implement partition method
for numpy array. Let's say I can compile npy_partition.h.src, import
it through CFFI. Therefore I can write a python function
my_partition(numpy_array, other_arguments...) that performs
partitioning for a give numpy array.

Now I want to create partition method for ndarray.
As far as I understand methods of ndarray are defined in
pypy/module/micronumpy/ndarray.py in a special way and
ndarray.partition = my_partition doesn't work.

Is it possible to add method to ndarray inside numpypy, not inside
pypy's micronumpy module?

-- 
Sergey


More information about the pypy-dev mailing list