[Numpy-discussion] R: R: R: R: R: fast numpy.fromfile skipping data chunks

2013-03-14 Thread Andrea Cimatoribus
Thanks for all the feedback (on the SSD too). For what concerns biggus library, for working on larger-than-memory arrays, this is really interesting, but unfortunately I don't have time to test it at the moment, I will try to have a look at it in the future. I hope to see something like that

[Numpy-discussion] Numpy correlate

2013-03-14 Thread Sudheer Joseph
Dear Numpy/Scipy experts,                                               Attached is a script which I made to test the numpy.correlate ( which is called py plt.xcorr) to see how the cross correlation is calculated. From this it appears the if i call plt.xcorr(x,y) Y is slided back in time

Re: [Numpy-discussion] can't run cython on mtrand.pyx

2013-03-14 Thread Robert Kern
On Wed, Mar 13, 2013 at 7:20 PM, Neal Becker ndbeck...@gmail.com wrote: Robert Kern wrote: On Wed, Mar 13, 2013 at 6:40 PM, Neal Becker ndbeck...@gmail.com wrote: Grabbed numpy-1.7.0 source. Cython is 0.18 cython mtrand.pyx produces lots of errors. It helps to copy-and-paste the errors

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-14 Thread Robert Kern
On Wed, Mar 13, 2013 at 12:16 AM, Neal Becker ndbeck...@gmail.com wrote: I guess I talked to you about 100 years ago about sharing state between numpy rng and code I have in c++ that wraps boost::random. So is there a C-api for this RandomState object I could use to call from c++? Maybe I

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-14 Thread Neal Becker
Robert Kern wrote: On Wed, Mar 13, 2013 at 12:16 AM, Neal Becker ndbeck...@gmail.com wrote: I guess I talked to you about 100 years ago about sharing state between numpy rng and code I have in c++ that wraps boost::random. So is there a C-api for this RandomState object I could use to call

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-14 Thread Neal Becker
Robert Kern wrote: On Wed, Mar 13, 2013 at 12:16 AM, Neal Becker ndbeck...@gmail.com wrote: I guess I talked to you about 100 years ago about sharing state between numpy rng and code I have in c++ that wraps boost::random. So is there a C-api for this RandomState object I could use to call

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-14 Thread Robert Kern
On Thu, Mar 14, 2013 at 11:00 AM, Neal Becker ndbeck...@gmail.com wrote: Robert Kern wrote: On Wed, Mar 13, 2013 at 12:16 AM, Neal Becker ndbeck...@gmail.com wrote: I guess I talked to you about 100 years ago about sharing state between numpy rng and code I have in c++ that wraps

Re: [Numpy-discussion] Dot/inner products with broadcasting?

2013-03-14 Thread Jaakko Luttinen
Answering to myself, this pull request seems to implement an inner product with broadcasting (inner1d) and many other useful functions: https://github.com/numpy/numpy/pull/2954/ -J On 03/13/2013 04:21 PM, Jaakko Luttinen wrote: Hi! How can I compute dot product (or similar multiplysum

Re: [Numpy-discussion] Any help from Numpy community?

2013-03-14 Thread Ryan
Birdada Simret birdada85 at gmail.com writes: Any help from Numpy community [[   0.          1.54        0.          0.          0.            1.08     1.08      1.08  ] [ 1.54        0.          1.08        1.08      1.08        0.          0.           0.   ]  [    0.       1.08      

Re: [Numpy-discussion] Adopt Mersenne Twister 64bit?

2013-03-14 Thread Neal Becker
Robert Kern wrote: On Thu, Mar 14, 2013 at 11:00 AM, Neal Becker ndbeck...@gmail.com wrote: Robert Kern wrote: On Wed, Mar 13, 2013 at 12:16 AM, Neal Becker ndbeck...@gmail.com wrote: I guess I talked to you about 100 years ago about sharing state between numpy rng and code I have in c++

Re: [Numpy-discussion] Any help from Numpy community?

2013-03-14 Thread Ryan
Birda, I think this will get you some of the way there: import numpy as np x = ... # Here's your 2D atomic distance array # Create an indexing array index = np.arange( x.size ).reshape( x.shape ) # Find the non-zero indices items = index[ x != 0 ] # You only need the first half

Re: [Numpy-discussion] Any help from Numpy community?

2013-03-14 Thread Birdada Simret
Hi Ryan,Thank you very much indeed, I'm not sure if I well understood your code, let say, for the example array matrix given represents H3C-CH3 connection(bonding). the result from your code is: Rows:[0 0 0 0 1 1 1] # is these for C indices? Columns: [1 2 3 4 5 6 7] # is these for H

Re: [Numpy-discussion] R: R: R: R: R: fast numpy.fromfile skipping data chunks

2013-03-14 Thread Chris Barker - NOAA Federal
On Thu, Mar 14, 2013 at 1:48 AM, Andrea Cimatoribus andrea.cimatori...@nioz.nl wrote: Thanks for all the feedback (on the SSD too). For what concerns biggus library, for working on larger-than-memory arrays, this is really interesting, but unfortunately I don't have time to test it at the

Re: [Numpy-discussion] Any help from Numpy community?

2013-03-14 Thread Ryan
Birdada Simret birdada85 at gmail.com writes: Hi Ryan,Thank you very much indeed, I'm not sure if I well understood your code, let say, for the example array matrix given represents  H3C-CH3 connection(bonding). the result from your code is: Rows:    [0 0 0 0 1 1 1]  # is these for C

Re: [Numpy-discussion] Any help from Numpy community?

2013-03-14 Thread Birdada Simret
Oh, thanks alot. can the atoms = np.array(['C1', 'C2', 'H3', 'H4', 'H5', 'H6', 'H7', 'H8']) able to make general? I mean, if I have a big molecule, it seems difficult to label each time. Ofcourse I'm new to python(even for programing) and I didn't had any knowhow about pandas, but i will try it.