Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-16 Thread Ravi
code are few and far between. OO, generic programming, and functional programming are the only techniques of which I am aware for building large scale programs with manageable complexity. I would take any Fortran hype with large grains of salt. Regards, Ravi ___

Re: [Numpy-discussion] Announcing toydist, improving distribution and packaging situation

2009-12-30 Thread Ravi
se to impossible to get code to work without > quite good knowledge on multiple platforms without errors. Not sure that that is quite true. C++ is not a very popular language around here, but the combination of boost+Qt+python+scipy+hdf5+h5py has made virtually all of my platform-specific code vanish (with the exception of some platform-specific stuff in my CMake scripts). Regards, Ravi ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] initializing an array of lists

2009-11-08 Thread Ravi
On Saturday 07 November 2009 22:56:29 a...@ajackson.org wrote: > I want to build a 2D array of lists, and so I need to initialize the > array with empty lists : > > myarray = array([[[],[],[]] ,[[],[],[]]]) In [1]: [[[]]*3]*2 Out[1]: [[[], [], []], [[], [], []]] Hope this

Re: [Numpy-discussion] ImportError: ccompiler

2009-03-09 Thread Ravi
python 2.6, will a corresponding scipy 0.7.x binary be available for python 2.6? Or is my assumption -- that the scipy 0.7.0 binary available for python 2.5 will not work with python 2.6 -- incorrect? Regards, Ravi ___ Numpy-discussion mailing lis

Re: [Numpy-discussion] ImportError: ccompiler

2009-03-09 Thread Ravi
good news, for I can finally get rid of lots of hacks (specifically to work around MSVC 7.1 deficiencies) in my code. MSVC 9.0 (used to build python 2.6) will, hopefully, be a little better. Regards, Ravi ___ Numpy-discussion mailing list Numpy-dis

Re: [Numpy-discussion] Easy way to vectorize a loop?

2009-03-02 Thread Ravi
or flattened[ idx ] += vals if 'vals' and 'idx' have the same size. Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Fancy indexing question:

2009-02-24 Thread Ravi
, 18, 19], [20, 21, 22, 23]]) In [3]: i = array( [1,3,4] ) In [4]: j = array( [1,3] ) In [5]: a[ ix_(i,j) ] Out[5]: array([[ 5, 7], [13, 15], [17, 19]]) Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.

[Numpy-discussion] Unnecessary axes in recarrays

2009-02-10 Thread Ravi
;,uint8,1), ('d',d1,(1,1)) ] ) In [107]: zeros( (4,), dtype=uint8 ).view( d2 )[ 'd' ].shape Out[107]: (1,) Why does d3 field 'd' have an extra axis? And why does d4 field 'd' have only one axis? Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] python numpy code many times slower than c++

2009-01-21 Thread Ravi
es of the reference, not of the actual array. This simplifies the code quite a bit while maintaining the reference semantics that python programmers use. See dump_vec in decco.cc (the example module) for an example. Regards, Ravi ___ Numpy-discussio

Re: [Numpy-discussion] python numpy code many times slower than c++

2009-01-21 Thread Ravi
ks for the code. Could you provide some benchmarks on the relative speeds of the two approaches? Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] python numpy code many times slower than c++

2009-01-21 Thread Ravi
ery much like to take a look at it. Regards, Ravi --- numpyregister.hpp.old 2009-01-21 11:15:50.0 -0500 +++ numpyregister.hpp 2008-10-08 11:35:24.0 -0400 @@ -174,6 +174,7 @@ static void execute() {} }; +// Structure to hold flags for creating arrays referencing existing

Re: [Numpy-discussion] python numpy code many times slower than c++

2009-01-21 Thread Ravi
found a bug with memory management that I fixed in the updated code. Does that still not work for you? Regards, Ravi [1] http://mail.python.org/pipermail/cplusplus-sig/2008-October/013825.html ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] array not appending

2008-12-18 Thread Ravi
: (0,) In [6]: y = zeros( (0,), dtype=int32 ) In [7]: y.shape Out[7]: (0,) Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Mersenne twister seeds

2008-12-15 Thread Ravi
do this?  And if so, is this potentially a problem? No. Once the seeding is done, the Mersenne twister generates the random numbers. So long as you are using those, you are fine (except for cryptographic applications). If you don't trust the seed, you could always seed it yourself a

Re: [Numpy-discussion] access ndarray in C++

2008-12-10 Thread Ravi
Oops, please ignore my previous message. I just started using a new mail client which marked some of my old messages (which I had tagged interesting) the same as new messages and I just blindly replied to them without checking the date. Sorry about the spam. Ravi

Re: [Numpy-discussion] access ndarray in C++

2008-12-10 Thread Ravi
umpy", "ndarray" ); 3. If you want the C++-way of dealing with numpy matrices & vectors directly as objects look at either of the following: http://mail.python.org/pipermail/cplusplus-sig/2008-October/013825.html http://mathema.tician.de/software/pyublas Of course,

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-12 Thread Ravi
+ boost.ublas + numpy: http://mail.python.org/pipermail/cplusplus-sig/2008-October/013825.html Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] "Advanced indexing" question - subset of data cube as a 2D array.

2008-10-29 Thread Ravi
[4]: y[ ix_( array([1,2]), array([1,3,4]) ) ] Out[4]: array([[ 6, 8, 9], [11, 13, 14]]) Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Octave-numpy bridge?

2008-10-21 Thread Ravi
ably be the simplest way to make it work. Thank you very much for the pointer. Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Octave-numpy bridge?

2008-10-20 Thread Ravi
cent. Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy fileIO

2008-10-16 Thread Ravi
for storing their images and will likely be supported for decades to come. Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] can't build numpy 1.2.0 u nder python 2.6 (windows-amd64) using VS9

2008-10-10 Thread Ravi
pport on mingw and how can I help? I am a Windows n00b (mostly by choice) when it comes to platform-specific issues. Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] can't build numpy 1.2.0 under python 2.6 (windows-amd64) using VS9

2008-10-09 Thread Ravi
> effects. Given that commenting out the section above allows numpy to compile without any apparent side effects, is there any chance we could get "experimental" binaries of numpy 1.2.0 for python 2.6? I do understand that a negative answer is very likely and the reasons therefor.

Re: [Numpy-discussion] can't build numpy 1.2.0 under python 2.6 (windows-amd64) using VS9

2008-10-08 Thread Ravi
received have been from Linux and Solris users. Thank for taking on this arduous task. Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] can't build numpy 1.2.0 u nder python 2.6 (windows-amd64) using VS9

2008-10-08 Thread Ravi
> > work 100% with python 2.6 - so check this out if you do plan to use > > more than just numpy.  There are sometimes drawbacks to using brand > > new releases ;) > > If I understand Ravi right, one problem with 2.5 is that it relies on an > old toolset (VS 2003, not availa

Re: [Numpy-discussion] can't build numpy 1.2.0 u nder python 2.6 (windows-amd64) using VS9

2008-10-08 Thread Ravi
or numpy 1.3? Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] PyArray_New bug?

2008-10-04 Thread Ravi
_New( &PyArray_Type, 2, dims, /*whatever*/, NULL, NULL, 0, NPY_FARRAY, NULL ); Both the above return a array who PyArray_ISFORTRAN( obj ) succeeds. I can verify this by checking bits 0 and 1 (LSB is bit 0) of PyArray_FLAGS. Regar

Re: [Numpy-discussion] PyArray_Resize reference counting

2008-10-01 Thread Ravi
array guaranteed to be at least in an internally consistent state (weak exception safety)? In general, do functions modifying numpy arrays provide at least weak exception safety guarantee? Or do they go one step further and provide rollback semantics in ca

Re: [Numpy-discussion] PyArray_Resize reference counting

2008-09-30 Thread Ravi
, should resizing be disallowed (by me as a programmer writing code for A, B and C) in order to ensure that the arrays as seen by them do not go out of sync? Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.

[Numpy-discussion] PyArray_Resize reference counting

2008-09-30 Thread Ravi
decrement the reference once to get it back to 17 because I should not need a reference as I already have one. Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Making NumPy accessible to everyone (or no-one)

2008-04-11 Thread Ravi
on I crossed over from Matlab+C to Python+C++. Regards, Ravi ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion