[Numpy-discussion] Subclassing record array

2009-10-17 Thread Loïc BERTHE
Hi, I would like to create my own class of record array to deal with units. Here is the code I used, inspired from http://docs.scipy.org/doc/numpy-1.3.x/user/basics.subclassing.html#slightly-more-realistic-example-attribute-added-to-existing-array : [code] from numpy import * class BlocArra

[Numpy-discussion] Need some explanations on assigning/incrementing values in Numpy

2008-11-22 Thread Loïc BERTHE
I've encoutered an error during an ipython's session that I fail to understand : In [12]: n = 4 In [13]: K = mat(diag(arange(2*n))) In [14]: print K [[0 0 0 0 0 0 0 0] [0 1 0 0 0 0 0 0] [0 0 2 0 0 0 0 0] [0 0 0 3 0 0 0 0] [0 0 0 0 4 0 0 0] [0 0 0 0 0 5 0 0] [0 0 0 0 0 0 6 0] [0 0 0 0 0 0 0

[Numpy-discussion] numpy.test() fails if it runs after scipy.test()

2008-02-23 Thread Loïc BERTHE
Hi, I've got one failure if I run numpy.test() after running scipy.test() : == ERROR: Ticket #396 -- Traceback (most recent call last): File "/home/loic/tmp/