On Mon, Jun 4, 2012 at 9:30 PM, Travis Oliphant wrote:
> Can you raise an issue on the Github issue tracker for NumPy? These issues
> will be looked at more closely. This kind of change should not have made it
> in to the release.
Thanks Travis! I've made this https://github.com/numpy/nump
Using the 'h2' is redundant, but it should not have been changed so quickly.
I could see raising a deprecation warning and communicating the correct
spelling ('i2').
-Travis
On Jun 3, 2012, at 6:45 PM, Benjamin Root wrote:
>
>
> On Sunday, June 3, 2012, Ralf Gommers wrote:
>
>
> On
Can you raise an issue on the Github issue tracker for NumPy? These issues
will be looked at more closely. This kind of change should not have made it
in to the release.
Given the lack of availability of time from enough experts in NumPy, this is
the sort of thing that can happen. I w
On Monday, June 4, 2012, Chris Barker wrote:
> On Mon, Jun 4, 2012 at 11:10 AM, Patrick Redmond
> >
> wrote:
> > Here's how I sorted primarily by field 'a' descending and secondarily by
> > field 'b' ascending:
>
> could you multiply the numeric field by -1, sort, then put it back --
> somethign
Gideon,
For these use cases, you will need to write short wrapper functions yourself.
In the online docs,
http://docs.scipy.org/doc/numpy/reference/swig.interface-file.html
in the section entitled "Beyond the Provided Typemaps", subsection "A Common
Example", there is an example of how to
On Mon, Jun 4, 2012 at 11:10 AM, Patrick Redmond wrote:
> Here's how I sorted primarily by field 'a' descending and secondarily by
> field 'b' ascending:
could you multiply the numeric field by -1, sort, then put it back --
somethign like:
data *- -1
data_sorted = np.sort(data, order=['a','b'])
HAVe you discovered the numpy.i interface files?
I haven't done SWIG in a while, but they should take care of at least
some of this for you.
They used to be distributed with numpy (in docs?), but some googling
should find then in any case.
-Chris
On Mon, Jun 4, 2012 at 2:00 PM, Gideon Simpson
On Mon, Jun 4, 2012 at 10:00 PM, Thouis (Ray) Jones wrote:
> On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones wrote:
>> I could look into this. There are only ~10 places the code generates
>> this error, so it should be a pretty minor change.
>
> My initial estimate was low, but not overly so.
On 06/04/2012 09:06 PM, Mike Hansen wrote:
> On Mon, May 28, 2012 at 3:15 AM, Mike Hansen wrote:
>> In trying to upgrade NumPy within Sage, we notices some differences in
>> behavior between 1.5 and 1.6. In particular, in 1.5, we have
>>
>> sage: f = 0.5
>> sage: f.__array_interface__
>> {'typest
On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones wrote:
> On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers wrote:
>> On 01/06/2012 16:39, Benjamin Root wrote:
>>>
>>>
>>> > >>> import numpy
>>> > >>> numpy.zeros(10)[-123]
>>> > Traceback (most recent call last):
>>> > File ""
There are two types of swig problems that I was hoping to get some help with.
First, suppose I have some C function
void f(double *x, int nx, double *y, int ny);
where we input one array, and we output another array, both of which should be
the same size.
I have used in my .i file:
%apply(doub
On Wed, May 16, 2012 at 10:50 PM, Ralf Gommers
wrote:
>
>
> On Wed, May 16, 2012 at 9:57 PM, Julian Taylor <
> jtaylor.deb...@googlemail.com> wrote:
>
>> On 05/16/2012 09:01 PM, Ralf Gommers wrote:
>> >
>> >
>> > On Tue, May 15, 2012 at 10:35 PM, Julian Taylor
>> > mailto:jtaylor.deb...@googlemail
On Mon, May 28, 2012 at 3:15 AM, Mike Hansen wrote:
> In trying to upgrade NumPy within Sage, we notices some differences in
> behavior between 1.5 and 1.6. In particular, in 1.5, we have
>
> sage: f = 0.5
> sage: f.__array_interface__
> {'typestr': '=f8'}
> sage: numpy.array(f)
> array(0.5)
> sa
Here's how I sorted primarily by field 'a' descending and secondarily by
field 'b' ascending:
(Note that 'a' is the second column, 'b' is the first)
>>> data
array([('b', 0.03),
('c', 0.03),
('f', 0.03),
('e', 0.01),
('d', 0.04),
('a', 0.04)],
dtype=[('b',
There is an interesting project called http://huboard.com/The projects
suggests using a few Column Labels that provides a nice card-based window onto
the Github issues.
I have turned on issue tracking and started a few labels. Feel free to add
more / adjust the names as appropriate.
Hi!
I have a one-dimensional ndarray with two fields. I'd like to sort in
descending order by field 'a', breaking ties by sorting in ascending
order by field 'b'.
I've found combinations of sorting and reversing followed by stable
sorting that work, but there must be a straightforward way to do i
On Mon, Jun 4, 2012 at 9:38 AM, Robert Kern wrote:
> # Now use the numpy.delete() function to get the matrix
> # with those rows and columns removed from the original matrix.
> P = np.delete(M, bad_rows, axis=0)
> P = np.delete(P, bad_cols, axis=1)
ah yes, forgot about np.delete -- that is a
On Mon, Jun 4, 2012 at 9:21 AM, bob tnur wrote:
> Hello every body. I am new to python.
> How to remove any row or column of a numpy matrix whose sum is 3.
> To obtain and save new matrix P with (sum(anyrow)!=3 and sum(anycolumn)!=3
> elements.
well, one question is -- do you want to remove the p
On Mon, Jun 4, 2012 at 6:05 PM, Charles R Harris
wrote:
>
>
> On Mon, Jun 4, 2012 at 9:34 AM, Ralf Gommers
> wrote:
>
>>
>>
>> On Sun, Jun 3, 2012 at 10:06 PM, Charles R Harris <
>> charlesr.har...@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> The issue tracking discussion seems to have died. Since gi
On Mon, Jun 4, 2012 at 5:21 PM, bob tnur wrote:
> Hello every body. I am new to python.
> How to remove any row or column of a numpy matrix whose sum is 3.
> To obtain and save new matrix P with (sum(anyrow)!=3 and sum(anycolumn)!=3
> elements.
>
> I tried like this:
>
> P = M[np.logical_not( (M[n
On Mon, Jun 4, 2012 at 9:34 AM, Ralf Gommers wrote:
>
>
> On Sun, Jun 3, 2012 at 10:06 PM, Charles R Harris <
> charlesr.har...@gmail.com> wrote:
>
>> Hi All,
>>
>> The issue tracking discussion seems to have died. Since github issues
>> looks to be a viable alternative at this point, I propose to
On Sun, Jun 3, 2012 at 10:06 PM, Charles R Harris wrote:
> Hi All,
>
> The issue tracking discussion seems to have died. Since github issues
> looks to be a viable alternative at this point, I propose to turn it on for
> the numpy repository and start directing people in that direction.
>
> Thoug
On 4. juni 2012, at 16:27, Thouis (Ray) Jones wrote:
> On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers wrote:
>> On 01/06/2012 16:39, Benjamin Root wrote:
>>>
>>>
>>> > >>> import numpy
>>> > >>> numpy.zeros(10)[-123]
>>> > Traceback (most recent call last):
>>> > File "",
On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers wrote:
> On 01/06/2012 16:39, Benjamin Root wrote:
>>
>>
>> > >>> import numpy
>> > >>> numpy.zeros(10)[-123]
>> > Traceback (most recent call last):
>> > File "", line 1, in
>> > IndexError: index out of bounds
>> >
>>
Hi,
On Mon, Jun 4, 2012 at 12:44 AM, srean wrote:
> Hi Wolfgang,
>
> I think you are looking for reduceat( ), in particular add.reduceat()
>
Indeed OP could utilize add.reduceat(...), like:
# tst.py
import numpy as np
def reduce(data, lengths):
ind, ends= np.r_[lengths, lengths], len
25 matches
Mail list logo