How about:
numpy.fromfile(filename, dtype='>i2')
Nadav
-Original Message-
From: [EMAIL PROTECTED] on behalf of Pierre GM
Sent: Fri 06-Apr-07 18:41
To: Discussion of Numerical Python
Cc:
Subject:Re: [Numpy-discussion] problem reading binary data from file
On Friday
Zdeněk Hurák fel.cvut.cz> writes:
> Sorry for not giving this important detail. I use gcc-4.1.1 compiler suite,
> which means that gfortran is used as a Fortran compiler. The same compiler
> was used to build Lapack.
I'm not sure if this will help, but have you tried to specify the gfortran
compi
Okay, I manually changed defined(linux) to defined(__GLIBC__). I still
get the same error with "_capi.c". It keeps trying to #include
. Any other things I can change to try to prevent the problem?
Thanks,
David
-Dave
Error output:
creating build/temp.linux-ppc-2.5/numpy/lib
creating build/
Matthew Koichi Grimes wrote:
>Travis wrote:
>
>
>>Short answer: No, they are not bugs.
>>
>>The rule is:
>>
>>In any mixed-type operation between two objects of the same
>>fundamental "kind" (i.e. integer, float, complex) arrays always have
>>precedence over "scalars" (where a 0-d array is c
> In fact numpy.fromfile was the first function I tried to use but I
> couldn't manage to get it working with the byteorder I needed
> (big-endian).
a = fromfile(...)
a.byteswap(True)
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959
Travis wrote:
>
> Short answer: No, they are not bugs.
>
> The rule is:
>
> In any mixed-type operation between two objects of the same
> fundamental "kind" (i.e. integer, float, complex) arrays always have
> precedence over "scalars" (where a 0-d array is considered a scalar
> in this context
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David Shepherd wrote:
> The second part of the patch is failing:
>
> # patch -p0 < ../uclibc-fenv.patch
> patching file numpy/core/include/numpy/ufuncobject.h
> patching file numpy/numarray/_capi.c
> Hunk #1 FAILED at 224.
> Hunk #2 FAILED at 2937.
>
Thanks to everyone, really.
I already know this ml is going to be as useful as numpy itself!
In fact numpy.fromfile was the first function I tried to use but I
couldn't manage to get it working with the byteorder I needed
(big-endian).
The ['f0'] trick works very nicely though, so I think I'll us
Chris wrote:
>> Sorry, this is not an answer, but it might help someone else to answer your
>> question: importing weave (using numpy-1.0.2) is one way to get this error
>> message.
>
> Is this something we should post on the scipy-dev mailing list instead?
> (Maybe
> there are other parts of
The second part of the patch is failing:
# patch -p0 < ../uclibc-fenv.patch
patching file numpy/core/include/numpy/ufuncobject.h
patching file numpy/numarray/_capi.c
Hunk #1 FAILED at 224.
Hunk #2 FAILED at 2937.
2 out of 2 hunks FAILED -- saving rejects to file numpy/numarray/_capi.c.rej
#
I at
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David Shepherd wrote:
> You know, looking at the core it looks like it has something to do with
> the "define(linux)" statement. I am running linux, but its a buildroot
> (uclibc) rootfs. Let me know if you need anymore information. Thanks.
>
> D
You know, looking at the core it looks like it has something to do with
the "define(linux)" statement. I am running linux, but its a buildroot
(uclibc) rootfs. Let me know if you need anymore information. Thanks.
Dave
David Shepherd wrote:
> Well, I get further into the compile process, but
Well, I get further into the compile process, but now it fails on
another gcc compile operations. This is essentially the same error
message I was getting before. It tries to #include , but does
not find it (it shouldn't be including it anyway, as you said). This
time it fails when trying to
Pierre GM wrote:
> With numpy.core.records, you create a record array. Just get the field ('f0'
> by default) to get a ndarray.
there is. Don't use numpy.core.records. Use numpy.fromfile:
import numpy
a = numpy.fromfile(filename, dtype=numpy.int16)
(filename can be a filename, or an open file
Giorgio F. Gilestro wrote:
>Hello everyone.
>
>Here I go with my first problem for this ml!
>
>I am reading a long sequence of binary data from a file using a call
>similar to the following
>
>numpy.core.records.fromfile (filename, formats='i2', byteorder='big')
>
>My problem is that this function
On Friday 06 April 2007 12:14:20 Giorgio F. Gilestro wrote:
> Is there any way I could get a 1D array (no tuples please!) directly
> from the file?
> (BTW numpy.core.records.fromstring gives the same output)
numpy.core.records.fromfile (filename, formats='i2', byteorder='big')['f0']
With numpy.c
Hello everyone.
Here I go with my first problem for this ml!
I am reading a long sequence of binary data from a file using a call
similar to the following
numpy.core.records.fromfile (filename, formats='i2', byteorder='big')
My problem is that this function returns an array of tuples rather
tha
Robert Kern wrote:
> They are, but an older one. There have been significant improvements to the
> Core
> Duo 2 code in ATLAS releases, but no updates to Accelerate.
Let's hope they'll be forthcoming.
Thanks for the update. This may be important to me soon.
-Chris
--
Christopher Barker, Ph.D
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David Shepherd wrote:
> Hey all,
>
> We started to try and compile the numpy module on an embedded PowerPC
> Xilinx board with no luck. This is one of the errors I get when I try
> to build the module on-board. It is due to the fact that the compi
Hey all,
We started to try and compile the numpy module on an embedded PowerPC
Xilinx board with no luck. This is one of the errors I get when I try
to build the module on-board. It is due to the fact that the compiler
is located in a different location than the original compiler for python
> Sorry, this is not an answer, but it might help someone else to answer your
> question: importing weave (using numpy-1.0.2) is one way to get this error
> message.
Is this something we should post on the scipy-dev mailing list instead? (Maybe
there are other parts of scipy that need to be up
> Warning (from warnings module): File "C:\Python25\lib\site-
packages\numpy\testing\numpytest.py", line 634 DeprecationWarning)
DeprecationWarning: ScipyTest is now called NumpyTest; please update your code
Sorry, this is not an answer, but it might help someone else to answer your
questio
Warning (from warnings module):
File "C:\Python25\lib\site-packages\numpy\testing\numpytest.py", line 634
DeprecationWarning)
DeprecationWarning: ScipyTest is now called NumpyTest; please update your
code
I have written the simulation code with numpy 1.0.1 & scipy 0.52.
I installed the numpy
23 matches
Mail list logo