> 2009/9/17 Pauli Virtanen :
> to, 2009-09-17 kello 18:19 +0200, Scott Sinclair kirjoitti:
> [clip]
>> It's probably important that the documentation patches should be
>> committed pretty soon after being reviewed for obvious malicious code
>> and marked "OK to Apply". It's possible to edit docstri
There is a lot more it turns out:
atleast_1d
atleast_2d
atleast_3d
hstack
vstack
correlate2
linspace
logspace
finfo
iinfo
MachAr
Based on this I suspect there is quite a bit of work that got lost earlier
in the summer. A couple of times I saw the count of "needs editing" in the
stats go up by se
On 17-Sep-09, at 6:18 PM, Erin Sheldon wrote:
>
> You can just view it differently:
>
> In [4]: x=numpy.zeros(3,dtype=[('field1','S5'),('field2','f4'),
> ('field3','f4'),('field4','f4')])
>
> In [5]: x
> Out[5]:
> array([('', 0.0, 0.0, 0.0), ('', 0.0, 0.0, 0.0), ('', 0.0, 0.0, 0.0)],
> dtype
On Thu, Sep 17, 2009 at 6:12 PM, David Warde-Farley wrote:
> If I have a 1-dimensional array with a structured dtype, say str,
> float, float, float, float where all the float columns have their
> own names, and I just want to extract all the floats in the order they
> appear into a 2D matrix
If I have a 1-dimensional array with a structured dtype, say str,
float, float, float, float where all the float columns have their
own names, and I just want to extract all the floats in the order they
appear into a 2D matrix that disregards the dtype metadata... Is there
an easy way t
>
>
>
> In [1]: a = np.array([0, 2, 4, 1, 3, 0, 3, 4, 0, 1])
>
> In [2]: lim = 2
>
> In [3]: np.sign(a - lim)
> Out[3]: array([-1, 0, 1, -1, 1, -1, 1, 1, -1, -1])
>
Dooh. Facepalm. I should have thought of that myself! Only one intermediate
array needs to be created then. Thank you. That was
>
>
>
> If there are no NaNs, you only need to make 2 masks by using ones
> instead of empty. Not elegent but a little faster.
>
Good point! Thanks.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy
[Please pardon the piggybacking. I didn't get the original.]
On Thu, Sep 17, 2009 at 15:19, Keith Goodman wrote:
> On Thu, Sep 17, 2009 at 1:13 PM, Kim Hansen wrote:
>> Hi,
>>
>> Is there an array-like function equivalent with the builtin method for the
>> Python single-valued comparison cmp(x,y
On Thu, Sep 17, 2009 at 1:13 PM, Kim Hansen wrote:
> Hi,
>
> Is there an array-like function equivalent with the builtin method for the
> Python single-valued comparison cmp(x,y)?
>
> What I would like is a cmp(a, lim), where a is an ndarray and lim is a
> single value, and then I need an array ba
Hi,
Is there an array-like function equivalent with the builtin method for the
Python single-valued comparison cmp(x,y)?
What I would like is a cmp(a, lim), where a is an ndarray and lim is a
single value, and then I need an array back of a's shape giving the
elementwise comparison
array([cmp(a[0
On Thu, Sep 17, 2009 at 1:48 PM, Pauli Virtanen wrote:
> to, 2009-09-17 kello 11:21 -0400, Ralf Gommers kirjoitti:
> > After the recent move of the matrix module, all the changes to the
> > docstrings have disappeared from the doc wiki. I imagine the changes
> > still live somewhere in the underl
On 17-Sep-09, at 2:41 AM, David Cournapeau wrote:
> Not really (except for trivial things like scalar-matrix operations).
> The usual way to do it in matlab is repmat, which helps you doing
> 'manual broadcasting'.
In recent versions there is also 'bsxfun', which is an awkward way of
doing bro
to, 2009-09-17 kello 18:19 +0200, Scott Sinclair kirjoitti:
[clip]
> It's probably important that the documentation patches should be
> committed pretty soon after being reviewed for obvious malicious code
> and marked "OK to Apply". It's possible to edit docstrings that are
> marked as "OK to appl
to, 2009-09-17 kello 11:21 -0400, Ralf Gommers kirjoitti:
> After the recent move of the matrix module, all the changes to the
> docstrings have disappeared from the doc wiki. I imagine the changes
> still live somewhere in the underlying repo but are not visible to the
> user. Can they be restored
On Thu, Sep 17, 2009 at 10:14 AM, Gökhan Sever wrote:
>
> I use PIL to read my png file (after cropped the initial image to the
> column of my interest) Like:
>
> from PIL import Image
> myim = Image('seccol.png)
> imdata = np.array(myim.getdata())
>
> From this on, I am not sure what to provide t
On Thu, Sep 17, 2009 at 12:19 PM, Scott Sinclair wrote:
> > 2009/9/17 Ralf Gommers :
> > After the recent move of the matrix module, all the changes to the
> docstrings have disappeared from the doc wiki.
>
> Hmm.. http://article.gmane.org/gmane.comp.python.scientific.devel/9732 ;-)
>
>
> > I kn
On Sep 7, 2009, at 2:57 AM, David Cournapeau wrote:
> Hi,
>
>I noticed that numpy import times significantly are significantly
> worse than it used to be, and those are related to recent datetime
> related changes:
>
> # One month ago
> time python -c "import numpy" -> 141ms
>
> # Now:
> time
> 2009/9/17 Ralf Gommers :
> After the recent move of the matrix module, all the changes to the docstrings
> have disappeared from the doc wiki.
Hmm.. http://article.gmane.org/gmane.comp.python.scientific.devel/9732 ;-)
> I know it is quite a bit of work to do the merge. I remember Pauli saying
Hi,
After the recent move of the matrix module, all the changes to the
docstrings have disappeared from the doc wiki. I imagine the changes still
live somewhere in the underlying repo but are not visible to the user. Can
they be restored? If there is some unforeseen problem with that, I do have a
On Wed, Sep 16, 2009 at 10:46 PM, Tony S Yu wrote:
>
> On Sep 16, 2009, at 8:22 PM, Gökhan Sever wrote:
>
> Hello all,
>
> I want to be able to count predefined simple rectangle shapes on an image
> as shown like in this one:
> http://img7.imageshack.us/img7/2327/particles.png
>
> Which is in my
On Wed, Sep 16, 2009 at 7:53 PM, Alan G Isaac wrote:
> On 9/16/2009 8:22 PM, Gökhan Sever wrote:
> > I want to be able to count predefined simple rectangle shapes on an
> > image as shown like in this one:
> > http://img7.imageshack.us/img7/2327/particles.png
>
> ch.9 of
> http://www.amazon.com/B
On Wed, Sep 16, 2009 at 8:43 PM, David Warde-Farley wrote:
> On 16-Sep-09, at 8:22 PM, Gökhan Sever wrote:
>
> > Hello all,
> >
> > I want to be able to count predefined simple rectangle shapes on an
> > image as
> > shown like in this one:
> http://img7.imageshack.us/img7/2327/particles.png
> >
>
Christian K. skrev:
> Is there something like broadcasting in matlab?
Matlab does not do automatic broadcasting like NumPy and Fortran 95. You
have to broadcast manually, mostly using repmat (but there are other
ways as well). This should help:
http://home.online.no/~pjacklam/matlab/doc/mtt/doc
Hi Christian,
Christian K. wrote:
> Hi,
>
> this is probaby an unusual question here from someone used to numpy who is
> forced to work with matlab and it is not exactly the right place to ask.
> Sorry
> for that.
>
> Is there something like broadcasting in matlab?
Not really (except for triv
24 matches
Mail list logo