On Feb 15 06:25 -0600, Warren Weckesser wrote:
> Yes, such an array can be created using the as_strided() function from the
> module numpy.lib.stride_tricks:
Thank you, I will look into that.
best,
Steve
___
NumPy-Discussion mailing list
NumPy-Discussio
Hi
I'd like to repeat an array along a new axis (like broadcast):
In [8]: a
Out[8]:
array([[0, 1, 2],
[3, 4, 5]])
In [9]: b=repeat(a[None,...], 3, axis=0)
In [10]: b
Out[10]:
array([[[0, 1, 2],
[3, 4, 5]],
[[0, 1, 2],
[3
Hi
I stumbled upon some numpy behavior which I was not aware of.
Say I have an array of shape (2,2,3) and want to subtract the sub-array
a[...,0] of shape (2,2) from each a[...,i], i=0,1,2 .
## ok ##
In [1]: a=arange(2*2*3).reshape(2,2,3)
# Copy the array to be subtracted.
In [
Hi all
I'm subclassing ndarray following [1] and I'd like to know if i'm doing
it right. My goals are
- ndarray subclass MyArray with additional methods
- replacement for np.array, np.asarray on module level returning MyArray
instances
- expose new methods as functions on module level
On Oct 30 10:06 -0400, Pierre GM wrote:
> Steve,
> Right, there's not a lot of visibility for this one.
Yes, wouldn't it be better placed in the Cookbook section (or any other
suitable place that's visible to anyone entering scipy.org)? Other
pages are unfortunately also not visible, like
http:
On Oct 27 16:43 -0400, Pierre GM wrote:
>
> Erik, may be you could try the trick presented here :
> http://www.scipy.org/Subclasses
> in the __array_wrap__ section.
Stupid question: How do I find pages like
http://www.scipy.org/Subclasses on scipy.org?
I can find them with the search function,
On Oct 14 15:29 -1000, Eric Firing wrote:
> frank wang wrote:
> > Hi,
> >
> > I have a large ndarray that I want to dump to a file. I know that I can
> > use a for loop to write one data at a time. Since Python is a very
> > powerfully language, I want to find a way that will dump the data fas