Hello!
I'm a little confused about what rfftn is doing: It seems to me that
the best would be for it to return a C-contiguous array with the first
element reduced by a half (plus one), so that one can easily obtain
the non-repeated slices.
What I get is the following:
In [1]: from numpy import *
Robert Kern wrote:
> Well, it's consistent with all of the other coercion rules:
>
>
> In [6]: (array(5.0, dtype=float32) + 0).dtype
> Out[6]: dtype('float64')
duh! of course. If I use a float32 scalar for BOTH the operands, then I
get a float32 array out. Thanks,
-Chris
--
Christopher Bar
On Friday 01 December 2006 16:46, Keith Goodman wrote:
> The first line of the nan functions (such as nansum, nanmin, nanmax) is
> Is there some way to make it matrix in, matrix out?
Quick workaround:
Overwrite these functions with your own, where 'array' or 'asarray' in the
first line is replac
Matt Knox wrote:
> all I can come up with is dumb brute force methods by iterating through all
> the values. Anyone got any tricks I can use?
import numpy as np
def first_masked(m):
idx = np.where(m.mask)[0]
if len(idx) != 0:
return idx[0]
else:
raise ValueError("no
all I can come up with is dumb brute force methods by iterating through all the
values. Anyone got any tricks I can use?
Thanks,
- Matt Knox
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy
The first line of the nan functions (such as nansum, nanmin, nanmax) is
y = array(a)
That leads to matrix in, array out.
Is there some way to make it matrix in, matrix out?
Here, for example, is nansum:
def nansum(a, axis=None):
"""Sum the array over the given axis, treating NaNs as 0.
Chris Barker wrote:
> Hi all,
>
> I'd like to set the data type for what numpy.where creates. For example:
>
> import numpy as N
>
> N.where(a >= 5, 5, 0)
>
> creates an integer array, which makes sense.
>
> N.where(a >= 5, 5.0, 0)
>
> creates a float64 array, which also makes sense, but I'd
Hi all,
I'd like to set the data type for what numpy.where creates. For example:
import numpy as N
N.where(a >= 5, 5, 0)
creates an integer array, which makes sense.
N.where(a >= 5, 5.0, 0)
creates a float64 array, which also makes sense, but I'd like a float32
array, so I tried:
N.where(a
I search to handle time series by associating dates to a masked array, but no
set (directly) computation (sum, max, ...) on dates and have the possibility
to search/select datas entries by date.
Le Vendredi 01 Décembre 2006 13:54, Francesc Altet a écrit :
> If what you want is extending the func
Arg! I really didn't see that!
thanks
Le Vendredi 01 Décembre 2006 12:58, Pierre GM a écrit :
> On Friday 01 December 2006 06:19, Lionel Roubeyrie wrote:
> > Hi all,
> > is it possible to subclass numpy.array to set extras functionalities and
> > change the behavior of others? I can't find any doc
A Divendres 01 Desembre 2006 12:19, Lionel Roubeyrie escrigué:
> Hi all,
> is it possible to subclass numpy.array to set extras functionalities and
> change the behavior of others? I can't find any docs on that.
> Thanks
If what you want is extending the functionality of ndarray at C level,
there
I installed the Mac ScipySuperpack (from http://www.scipy.org/Download).
However it seems that the version of matplotlib in there is not
compatible with
their version of numpy
[EMAIL PROTECTED] ch2/pbcd -> python
ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on
Python 2.4.3 (#1,
On Friday 01 December 2006 06:19, Lionel Roubeyrie wrote:
> Hi all,
> is it possible to subclass numpy.array to set extras functionalities and
> change the behavior of others? I can't find any docs on that.
Did you really look ;) ?
http://www.scipy.org/Subclasses
Check also the new implementation
Hi all,
is it possible to subclass numpy.array to set extras functionalities and
change the behavior of others? I can't find any docs on that.
Thanks
--
Lionel Roubeyrie - [EMAIL PROTECTED]
LIMAIR
http://www.limair.asso.fr
___
Numpy-discussion mailing
A Dijous 30 Novembre 2006 20:14, John Hunter escrigué:
> A colleague of mine wants to write some numpy extension code. I
> pointed him to lots of examples in the matplotlib src dir, but the
> build environment is more complicated than he needs with all the
> numpy/numeric/numarray switches, etc.
15 matches
Mail list logo