
Jan. 23, 2016
8:24 a.m.
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