Re: [Numpy-discussion] read not byte aligned records

2015-05-10 Thread Gmail
For the archive, I tried to use bitarray instead of bitstring and for same file parsing went from 180ms to 60ms. Code was finally shorter and more simple but less easy to jump into (documentation). Performance is still far from using fromstring or fromfile which gives like 5ms for similar size of

[Numpy-discussion] read not byte aligned records

2015-05-04 Thread Gmail
Hi, I am developping a code to read binary files (MDF, Measurement Data File). In its previous version 3, data was always byte aligned. I used widely numpy.core.records module (fromstring, fromfile) showing good performance to read and unpack data on the fly. However, in the latest version 4, not

Re: [Numpy-discussion] 1.6.0b1 half float buffer bug?

2011-04-02 Thread Eli Stevens (Gmail)
On Sat, Apr 2, 2011 at 11:39 AM, Mark Wiebe wrote: > I've committed the patch adding 'e' to the buffer protocol and back-ported > it to the 1.6.x branch. Awesome! Thanks a bunch. :) > This leaves the testing with Cython and getting > consensus from CPython about the letter to use in the struct

Re: [Numpy-discussion] 1.6.0b1 half float buffer bug?

2011-04-01 Thread Eli Stevens (Gmail)
On Fri, Apr 1, 2011 at 5:28 PM, Mark Wiebe wrote: > Your changes look fine to me, and I think the tests are reasonable as is. I > would suggest tidying up your commit messages a bit, creating an enhancement > bug in the bug tracker, and making a pull request. Some info about the pull > requests is

Re: [Numpy-discussion] 1.6.0b1 half float buffer bug?

2011-03-31 Thread Eli Stevens (Gmail)
On Thu, Mar 31, 2011 at 11:45 AM, Ralf Gommers wrote: > On Thu, Mar 31, 2011 at 8:37 PM, Eli Stevens (Gmail) > wrote: >> Next up for me is to get a patch onto the CPython issue tracker, but >> as soon as I have that done, I'll start working on adding unit tests >> to

Re: [Numpy-discussion] 1.6.0b1 half float buffer bug?

2011-03-31 Thread Eli Stevens (Gmail)
On Thu, Mar 31, 2011 at 10:40 AM, Ralf Gommers wrote: > It would definitely need to get into beta 2, and even then I'm a > little hesitant to push in such a change at the last moment. If I miss the 1.6.0b2 cutoff, would a change like this be appropriate for 1.6.1, or will it need to wait until 1.

Re: [Numpy-discussion] 1.6.0b1 half float buffer bug?

2011-03-30 Thread Eli Stevens (Gmail)
On Fri, Mar 25, 2011 at 10:00 AM, Eli Stevens (Gmail) wrote: > Can anyone please give me some suggestions on how to go about writing > a unit test for this?  Or should I just submit a pull request? I've gotten a bit of positive feedback to adding the 'e' type to the struct

Re: [Numpy-discussion] 1.6.0b1 half float buffer bug?

2011-03-28 Thread Eli Stevens (Gmail)
On Fri, Mar 25, 2011 at 11:14 AM, Eli Stevens (Gmail) wrote: > On Fri, Mar 25, 2011 at 10:35 AM, Mark Wiebe wrote: >> That said, I think starting a discussion with the Python core developers >> about the float16 type is worthwhile. There might be interest in supporting >> th

Re: [Numpy-discussion] 1.6.0b1 half float buffer bug?

2011-03-25 Thread Eli Stevens (Gmail)
On Fri, Mar 25, 2011 at 10:35 AM, Mark Wiebe wrote: > That said, I think starting a discussion with the Python core developers > about the float16 type is worthwhile. There might be interest in supporting > the float16 type in the struct interface, something that would be required > as part of ame

Re: [Numpy-discussion] 1.6.0b1 half float buffer bug?

2011-03-25 Thread Eli Stevens (Gmail)
On Fri, Mar 25, 2011 at 10:21 AM, Pauli Virtanen wrote: > The buffer interface cannot be used to export the half-float types, since > the type is not specified in PEP 3118. Numpy cannot unilaterally add > nonstandard format codes to the spec. > > What can be done instead is exporting the half-floa

[Numpy-discussion] 1.6.0b1 half float buffer bug?

2011-03-25 Thread Eli Stevens (Gmail)
I'm working on getting support for 16-bit floats into cython and have run into what seems like a numpy bug (I'm a new contributor to both projects, so bear with me ;). https://github.com/wickedgrey/numpy/commit/29f9f1b709cc2c346b8514859c58a761df80f031 Adding NPY_HALF to the switch statement on li

Re: [Numpy-discussion] NumPy speed tests by NASA

2011-02-22 Thread Eli Stevens (Gmail)
On Tue, Feb 22, 2011 at 1:48 PM, Gael Varoquaux wrote: > Probably because the numpy binary that the author was using was compiled > without a blas implementation, and just using numpy's internal > lapack_lite. This is a common problem in real life. Is there an easy way to check from within numpy

Re: [Numpy-discussion] Is there a function to calculate ecnomic beta coefficient in numpy given two time series data.

2008-06-19 Thread Vineet Jain (gmail)
on of Numerical Python Subject: Re: [Numpy-discussion] Is there a function to calculate ecnomic beta coefficient in numpy given two time series data. On Thu, Jun 19, 2008 at 17:48, Vineet Jain (gmail) <[EMAIL PROTECTED]> wrote: > I took the following code and applied it to aapl and ti

Re: [Numpy-discussion] Is there a function to calculate ecnomic beta coefficient in numpy given two time series data.

2008-06-19 Thread Vineet Jain (gmail)
should be closer to 2. Any idea on what I'm doing wrong. Vineet -Original Message- From: Vineet Jain (gmail) [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 9:24 PM To: 'Discussion of Numerical Python' Subject: RE: [Numpy-discussion] Is there a function to calcula

Re: [Numpy-discussion] Is there a function to calculate ecnomic beta coefficient in numpy given two time series data.

2008-06-08 Thread Vineet Jain (gmail)
Currently my code handles market returns and stocks as 1d arrays. While the function below expects a matrix. Is there an equivalent of the function below which works with numpy arrays? I'd like to do: beta, resids, rank, s = mp.linalg.lstsq(mrkt_1d_array, stock_1d_array) If not, how do: 1. crea

Re: [Numpy-discussion] Is there a function to calculate ecnomic beta coefficient in numpy given two time series data.

2008-06-04 Thread Vineet Jain (gmail)
two time series data. On Wed, Jun 4, 2008 at 5:39 PM, Vineet Jain (gmail) <[EMAIL PROTECTED]> wrote: > Timeseries1 = daily or weekly close of stock a > > Timeseries2 = daily or weekly close of market index (spx, , etc) > > > > Beta of stock a is what I would like to c

[Numpy-discussion] Is there a function to calculate ecnomic beta coefficient in numpy given two time series data.

2008-06-04 Thread Vineet Jain (gmail)
Timeseries1 = daily or weekly close of stock a Timeseries2 = daily or weekly close of market index (spx, , etc) Beta of stock a is what I would like to compute as explained in this article on Wikipedia: http://en.wikipedia.org/wiki/Beta_coefficient I'm trying to compute the beta o