Hello,
I have a question about performing element-wise logical operations
on numpy arrays.
If a, b and c are numpy arrays of the same size, does the
following
syntax work?
mask = (a 1.0) ((b 3.0) | (c 10.0))
It seems to be performing correctly, but the documentation that I've
read
of Numerical Python numpy-discussion@scipy.org
2008/7/9 Catherine Moroney [EMAIL PROTECTED]:
I have a question about performing element-wise logical operations
on numpy arrays.
If a, b and c are numpy arrays of the same size, does the
following syntax work?
mask = (a 1.0) ((b 3.0) | (c
2008/7/9 Catherine Moroney [EMAIL PROTECTED]:
I have a question about performing element-wise logical operations
on numpy arrays.
If a, b and c are numpy arrays of the same size, does the
following syntax work?
mask = (a 1.0) ((b 3.0) | (c 10.0))
It seems
I'm looking for a way to acccomplish the following task without lots
of loops involved, which are really slowing down my code.
I have a 128x512 array which I want to break down into 2x2 squares.
Then, for each 2x2 square I want to do some simple calculations
such as finding the maximum value,
This almost works. Is there a way to do some masking on tiles, for
instance taking the maximum height of each 2x2 square that is an
odd number? I've tried playing around with masking and where, but
they don't return an array of the original size and shape of tiles
below.
Catherine
Perhaps
I'm able to remove the file using python's os module, but
I still get an error when trying to create the file using
pyhdf, this time specifiying SD.SDC.CREATE|SD.SDC.WRITE
on the file-create line.
It's still complaining that it can't open the path, even though
the specified filename is valid.
Hi,
I recently upgraded pyhdf from 0.7-3 to 0.8-2, and have noticed some
problems with the SD.SDim interface.
Specifically, the short test code attached works fine with version 0.7-3
and fails with version 0.8-2 when it's trying to assign a name
to the dimension.
I get the following error
Hello,
I'm not sure if this is the right list for this question, but attempts
to subscribe myself to f2py-users fail, as I never get an email back
asking
me to confirm my subscription request. Is that list no longer active?
I'm trying to compile a medium-short Fortran90 code using f2py, and
Hello,
I know that there must be a fast way of solving this problem, but I
don't know
what it is.
I have three arrays, with dimensions:
A[np]
L[np]
S[np]
where L and S indicate the line, smp co-ordinates for each of the
np rows.
I want to reconstruct the contents of [A] as a 2-dimensional
I've noticed a lot of discussion on how to read binary files
written out from Fortran, and nobody seems to have mentioned
how to modify your Fortran code so it writes out a file that
can be read with numpy.fromfile() in a single line.
For example, to write out a NLINE x NSMP array of floats in
10 matches
Mail list logo