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

Andrea Cimatoribus Andrea.Cimatoribus@nioz...
Wed Mar 13 09:40:07 CDT 2013


On top of that, there is another issue: it can be that the data available itself is not a multiple of dtype, since there can be write errors at the end of the file, and I don't know how to deal with that.
________________________________________
Da: numpy-discussion-bounces@scipy.org [numpy-discussion-bounces@scipy.org] per conto di Andrea Cimatoribus
Inviato: mercoledì 13 marzo 2013 15.37
A: Discussion of Numerical Python
Oggetto: [Numpy-discussion] R: R: fast numpy.fromfile skipping data chunks

Indeed, but that offset "it should be a multiple of the byte-size of dtype" as the help says.
Indeed, this is silly.

________________________________________
Da: numpy-discussion-bounces@scipy.org [numpy-discussion-bounces@scipy.org] per conto di Nathaniel Smith [njs@pobox.com]
Inviato: mercoledì 13 marzo 2013 15.32
A: Discussion of Numerical Python
Oggetto: Re: [Numpy-discussion] R: fast numpy.fromfile skipping data chunks

On Wed, Mar 13, 2013 at 2:18 PM, Andrea Cimatoribus
<Andrea.Cimatoribus@nioz.nl> wrote:
> This solution does not work for me since I have an offset before the data that is not a multiple of the datatype (it's a header containing various stuff).

np.memmap takes an offset= argument.

-n
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


More information about the NumPy-Discussion mailing list