On Tue, Aug 4, 2009 at 5:28 PM, David
Cournapeauda...@ar.media.kyoto-u.ac.jp wrote:
No, I think you and Matthew actually found a bug in recent changes I
have done in distutils. I will fix it right away,
Ok, not right away, but could you check that r7280 fixed it for you ?
cheers,
David
David Cournapeau cournape at gmail.com writes:
On Tue, Aug 4, 2009 at 5:28 PM, David
Cournapeaudavid at ar.media.kyoto-u.ac.jp wrote:
No, I think you and Matthew actually found a bug in recent changes I
have done in distutils. I will fix it right away,
Ok, not right away, but could
Dave dave.hirschfeld at gmail.com writes:
Work's for me.
-Dave
Except now when trying to compile the latest scipy I get the following error:
C:\dev\src\scipysvn up
Fetching external item into 'doc\sphinxext'
External at revision 7280.
At revision 5890.
C:\dev\src\scipypython setup.py
Dave wrote:
Dave dave.hirschfeld at gmail.com writes:
Work's for me.
-Dave
Except now when trying to compile the latest scipy I get the following error:
Was numpy installed from a bdist_wininst installer, or did you use the
install method directly ?
David
David Cournapeau david at ar.media.kyoto-u.ac.jp writes:
Dave wrote:
Dave dave.hirschfeld at gmail.com writes:
Work's for me.
-Dave
Except now when trying to compile the latest scipy I get the following
error:
Was numpy installed from a bdist_wininst
Dave wrote:
David Cournapeau david at ar.media.kyoto-u.ac.jp writes:
Dave wrote:
Dave dave.hirschfeld at gmail.com writes:
Work's for me.
-Dave
Except now when trying to compile the latest scipy I get the following
error:
On Tue, Aug 4, 2009 at 8:13 PM, David
Cournapeauda...@ar.media.kyoto-u.ac.jp wrote:
I think I understand the problem. Unfortunately, that's looks tricky to
solve... I hate distutils.
Ok - should be fixed in r7281.
David
___
NumPy-Discussion mailing
David Cournapeau cournape at gmail.com writes:
On Tue, Aug 4, 2009 at 8:13 PM, David
Cournapeaudavid at ar.media.kyoto-u.ac.jp wrote:
I think I understand the problem. Unfortunately, that's looks tricky to
solve... I hate distutils.
Ok - should be fixed in r7281.
David
Well,
On Tue, Aug 4, 2009 at 10:51 AM, Dave dave.hirschf...@gmail.com wrote:
David Cournapeau cournape at gmail.com writes:
On Tue, Aug 4, 2009 at 8:13 PM, David
Cournapeaudavid at ar.media.kyoto-u.ac.jp wrote:
I think I understand the problem. Unfortunately, that's looks tricky to
Hi,
On Tue, Aug 4, 2009 at 9:31 AM, David Cournapeaucourn...@gmail.com wrote:
On Tue, Aug 4, 2009 at 8:13 PM, David
Cournapeauda...@ar.media.kyoto-u.ac.jp wrote:
I think I understand the problem. Unfortunately, that's looks tricky to
solve... I hate distutils.
Ok - should be fixed in
On Tue, Aug 4, 2009 at 15:09, Matthew Brettmatthew.br...@gmail.com wrote:
File
/home/mb312/usr/local/lib/python2.5/site-packages/numpy/distutils/command/build_ext.py,
line 74, in run
self.library_dirs.append(build_clib.build_clib)
UnboundLocalError: local variable 'build_clib'
Hi,
We are using numpy.distutils, and have run into this odd behavior in windows:
I have XP, Mingw, latest numpy SVN, python.org python 2.6. All the
commands below I am running from within the 'numpy' root directory
(where 'numpy' is a subdirectory).
If I run
python setup.py build
I get the
Matthew Brett wrote:
Hi,
We are using numpy.distutils, and have run into this odd behavior in windows:
I have XP, Mingw, latest numpy SVN, python.org python 2.6. All the
commands below I am running from within the 'numpy' root directory
(where 'numpy' is a subdirectory).
If I run
Numpy 1.3
In [1]: import numpy as np
In [2]: a = np.zeros(5).fill(5)
In [3]: a
In [4]: type(a)
Out[4]: type 'NoneType'
In [5]: a = np.zeros(5)
In [6]: a.fill(5)
In [7]: a
Out[7]: array([ 5., 5., 5., 5., 5.])
What i'm trying to do may not be the best way, but I think it should
still
On Fri, Jul 31, 2009 at 17:15, Chris Colbertsccolb...@gmail.com wrote:
Numpy 1.3
In [1]: import numpy as np
In [2]: a = np.zeros(5).fill(5)
In [3]: a
In [4]: type(a)
Out[4]: type 'NoneType'
In [5]: a = np.zeros(5)
In [6]: a.fill(5)
In [7]: a
Out[7]: array([ 5., 5., 5., 5.,
ahh, yeah I see now. Thanks!
nothing like making myself look the fool on a friday!
Cheers!
On Fri, Jul 31, 2009 at 6:20 PM, Robert Kernrobert.k...@gmail.com wrote:
On Fri, Jul 31, 2009 at 17:15, Chris Colbertsccolb...@gmail.com wrote:
Numpy 1.3
In [1]: import numpy as np
In [2]: a =
On Fri, Jul 31, 2009 at 4:30 PM, Chris Colbert sccolb...@gmail.com wrote:
ahh, yeah I see now. Thanks!
nothing like making myself look the fool on a friday!
If you have to choose a day, Friday is the day of choice. Or a least it
supposedly works that way for bad news and politics.
Chuck
Awww, it's fun to be foolish on Fridays!
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Hey Travis!
2009/3/13 Travis E. Oliphant oliph...@enthought.com:
Referencing my previous post on this topic. In this case, it is
unambiguous to replace dimensions 1 and 2 with the result of
broadcasting idx and idx together. Thus the (5,6) dimensions is
replaced by the (2,) result of
Travis E. Oliphant wrote:
shuwj5...@163.com wrote:
snipsnip
Travis, thanks for the excellent explanation! It clears something which
I think is related to this, I've been wanting to ask on the ml for some
time already.
Now here's the case.
I often have 4d arrays that are actually related sets
2009/3/12 Robert Kern robert.k...@gmail.com:
idx = np.array([0,1])
e = x[0,:,idx]
print e.shape
#- return (2,3). I think the right answer should be (3,2). Is
# it a bug here? my numpy version is 1.2.1.
It's certainly weird, but it's working as designed. Fancy indexing via
arrays
On Wed, Mar 11, 2009 at 19:55, shuwj5...@163.com shuwj5...@163.com wrote:
Hi,
import numpy as np
x = np.arange(30)
x.shape = (2,3,5)
idx = np.array([0,1])
e = x[0,idx,:]
print e.shape
# return (2,5). ok.
idx = np.array([0,1])
e = x[0,:,idx]
print e.shape
On Thu, Mar 12, 2009 at 01:34, Stéfan van der Walt ste...@sun.ac.za wrote:
2009/3/12 Robert Kern robert.k...@gmail.com:
idx = np.array([0,1])
e = x[0,:,idx]
print e.shape
#- return (2,3). I think the right answer should be (3,2). Is
# it a bug here? my numpy version is 1.2.1.
shuwj5...@163.com wrote:
It's certainly weird, but it's working as designed. Fancy indexing via
arrays is a separate subsystem from indexing via slices. Basically,
fancy indexing decides the outermost shape of the result (e.g. the
leftmost items in the shape tuple). If there are any sliced
Robert Kern wrote:
On Thu, Mar 12, 2009 at 01:34, Stéfan van der Walt ste...@sun.ac.za wrote:
2009/3/12 Robert Kern robert.k...@gmail.com:
idx = np.array([0,1])
e = x[0,:,idx]
print e.shape
#- return (2,3). I think the right answer should be (3,2). Is
# it a bug here?
Hi,
import numpy as np
x = np.arange(30)
x.shape = (2,3,5)
idx = np.array([0,1])
e = x[0,idx,:]
print e.shape
# return (2,5). ok.
idx = np.array([0,1])
e = x[0,:,idx]
print e.shape
#- return (2,3). I think the right answer should be (3,2). Is
# it a bug here? my
You lost me on
x = np.arange(30)
x.shape = (2,3,5)
For me I get:
In [2]: x = np.arange(30)
In [3]: x.shape
Out[3]: (30,)
which is what I would expect. Perhaps I missed something?
Jon.
On Wed, Mar 11, 2009 at 8:55 PM, shuwj5...@163.com shuwj5...@163.com wrote:
Hi,
import numpy as np
x
On Wed, Mar 11, 2009 at 21:51, Jonathan Taylor
jonathan.tay...@utoronto.ca wrote:
You lost me on
x = np.arange(30)
x.shape = (2,3,5)
For me I get:
In [2]: x = np.arange(30)
In [3]: x.shape
Out[3]: (30,)
which is what I would expect. Perhaps I missed something?
He is reshaping x by
On Wed, Mar 11, 2009 at 9:51 PM, Jonathan Taylor
jonathan.tay...@utoronto.ca wrote:
You lost me on
x = np.arange(30)
x.shape = (2,3,5)
For me I get:
In [2]: x = np.arange(30)
In [3]: x.shape
Out[3]: (30,)
which is what I would expect. Perhaps I missed something?
Jon.
- Show quoted
On Wed, Mar 11, 2009 at 19:55, shuwj5...@163.com shuwj5...@163.com wrote:
Hi,
import numpy as np
x = np.arange(30)
x.shape = (2,3,5)
idx = np.array([0,1])
e = x[0,idx,:]
print e.shape
# return (2,5). ok.
idx = np.array([0,1])
e = x[0,:,idx]
print e.shape
#- return (2,3). I
Thank you,
first tests work.
Thomas
Travis E. Oliphant wrote:
Thomas Hrabe wrote:
Hello everyone,
I must report odd behaviour of the numpy arrays regarding the flags set
for
each array object in C++.
Please have a look at the following code:
static PyObject* test(PyObject*
Hello everyone,
I must report odd behaviour of the numpy arrays regarding the flags set for
each array object in C++.
Please have a look at the following code:
static PyObject* test(PyObject* self,PyObject* args){
int s[2];
s[0] = 1;
s[1] = 1;
char* value =
I tried another approach, creating an array in python with
import numpy;
a = numpy.zeros((2,2),order=C);
a.flags.num
1285
and setting the flags within C++ to 1286.
The value remains the same (1285) after setting it to 1286 in embedded C.
PyArg_ParseTuple(args, O!,PyArray_Type, array)
Thomas Hrabe wrote:
Hello everyone,
I must report odd behaviour of the numpy arrays regarding the flags set for
each array object in C++.
Please have a look at the following code:
static PyObject* test(PyObject* self,PyObject* args){
int s[2];
s[0] = 1;
s[1] = 1;
Hi,
I just came across somethin I never noticed before. I cannot say whether
this is due to an update of numpy but it is possible - I am running
1.1.1 on __german__ windows. Here is the observation:
a = N.linspace(0,1,5)
a
array([ 0. , 0.25, 0.5 , 0.75, 1. ])
a.astype(float)
array([ 0.
On Sun, Aug 31, 2008 at 1:14 PM, Christian K. [EMAIL PROTECTED] wrote:
Hi,
I just came across somethin I never noticed before. I cannot say whether
this is due to an update of numpy but it is possible - I am running
1.1.1 on __german__ windows. Here is the observation:
a =
Charles R Harris schrieb:
On Sun, Aug 31, 2008 at 1:14 PM, Christian K. [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
Hi,
I just came across somethin I never noticed before. I cannot say whether
this is due to an update of numpy but it is possible - I am running
hi all,
isn't it a bug
(latest numpy from svn, as well as my older version)
from numpy import array
print array((1,2,3)).fill(10)
None
Regards, D.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
sorry, it isn't a bug, it's my fault, fill() returns None and do
in-place modification.
D.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
On Fri, Aug 29, 2008 at 10:19 AM, dmitrey [EMAIL PROTECTED] wrote:
hi all,
isn't it a bug
(latest numpy from svn, as well as my older version)
from numpy import array
print array((1,2,3)).fill(10)
None
Yeah, I do stuff like that too. fill works in place so it returns None.
x =
Keith Goodman wrote:
Yeah, I do stuff like that too. fill works in place so it returns None.
x = np.array([1,2])
x.fill(10)
x
array([10, 10])
x = x.fill(10) # -- Danger!
print x
None
Since result None is never used it would be better to return reference
On Fri, Aug 29, 2008 at 10:42 AM, dmitrey [EMAIL PROTECTED] wrote:
Keith Goodman wrote:
Yeah, I do stuff like that too. fill works in place so it returns None.
x = np.array([1,2])
x.fill(10)
x
array([10, 10])
x = x.fill(10) # -- Danger!
print x
None
Since result None is never
On Fri, Aug 29, 2008 at 10:51 AM, Keith Goodman [EMAIL PROTECTED] wrote:
On Fri, Aug 29, 2008 at 10:42 AM, dmitrey [EMAIL PROTECTED] wrote:
Keith Goodman wrote:
Yeah, I do stuff like that too. fill works in place so it returns None.
x = np.array([1,2])
x.fill(10)
x
array([10, 10])
On Fri, Aug 29, 2008 at 11:51 AM, Keith Goodman [EMAIL PROTECTED] wrote:
On Fri, Aug 29, 2008 at 10:42 AM, dmitrey [EMAIL PROTECTED]
wrote:
Keith Goodman wrote:
Yeah, I do stuff like that too. fill works in place so it returns None.
x = np.array([1,2])
x.fill(10)
x
I suppose all the discussion on comp.lang.python
about list methods (especially sort) is becoming
relevant to this thread.
Cheers,
Alan Isaac
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
2008/8/29 Charles R Harris [EMAIL PROTECTED]:
I like that idea. A lot of numpy functions return a reference to the
modified array when the output array (out) is specified.
Google up the various discussions of python sort to see why Guido doesn't
like that sort of thing. We've had that
Stéfan van der Walt wrote:
At first, I also thought it might be more intuitive to return the
output array, but then I realised that it would make it more difficult
to realise that the operation is being performed in-place. Maybe it
is good to remind programmers of what happens under the
On Fri, Aug 29, 2008 at 3:03 PM, Alan G Isaac [EMAIL PROTECTED] wrote:
Stéfan van der Walt wrote:
At first, I also thought it might be more intuitive to return the
output array, but then I realised that it would make it more difficult
to realise that the operation is being performed
Robert Kern wrote:
On Wed, May 28, 2008 at 7:52 PM, Travis E. Oliphant
[EMAIL PROTECTED] wrote:
Anne Archibald wrote:
2008/5/27 Robert Kern [EMAIL PROTECTED]:
Can we make it so that dtype('c') is preserved instead of displaying
'|S1'? It does not behave the same as
2008/5/27 Robert Kern [EMAIL PROTECTED]:
Can we make it so that dtype('c') is preserved instead of displaying
'|S1'? It does not behave the same as dtype('|S1') although it
compares equal to it.
It seems alarming to me that they should compare equal but behave
differently. Is it possible to
Anne Archibald wrote:
2008/5/27 Robert Kern [EMAIL PROTECTED]:
Can we make it so that dtype('c') is preserved instead of displaying
'|S1'? It does not behave the same as dtype('|S1') although it
compares equal to it.
It seems alarming to me that they should compare equal but
On Wed, May 28, 2008 at 7:52 PM, Travis E. Oliphant
[EMAIL PROTECTED] wrote:
Anne Archibald wrote:
2008/5/27 Robert Kern [EMAIL PROTECTED]:
Can we make it so that dtype('c') is preserved instead of displaying
'|S1'? It does not behave the same as dtype('|S1') although it
compares equal to
Charles R Harris wrote:
I vaguely recall this generated an array from all the characters.
In [1]: array('123', dtype='c')
Out[1]:
array('1',
dtype='|S1')
This may be a bug.
import Numeric
Numeric.array('123','c')
array([1, 2, 3],'c')
My memory of the point of 'c' was to mimic
On Tue, May 27, 2008 at 1:31 PM, Travis E. Oliphant [EMAIL PROTECTED]
wrote:
Charles R Harris wrote:
I vaguely recall this generated an array from all the characters.
In [1]: array('123', dtype='c')
Out[1]:
array('1',
dtype='|S1')
This may be a bug.
import Numeric
Charles R Harris wrote:
On Tue, May 27, 2008 at 1:31 PM, Travis E. Oliphant
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
Charles R Harris wrote:
I vaguely recall this generated an array from all the characters.
In [1]: array('123', dtype='c')
Out[1]:
On Tue, May 27, 2008 at 3:15 PM, Travis E. Oliphant
[EMAIL PROTECTED] wrote:
Charles R Harris wrote:
On Tue, May 27, 2008 at 1:31 PM, Travis E. Oliphant
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
Charles R Harris wrote:
I vaguely recall this generated an array from all the
Robert Kern wrote:
Can we make it so that dtype('c') is preserved instead of displaying
'|S1'? It does not behave the same as dtype('|S1') although it
compares equal to it.
We could with some special-casing in the representation for string
data-types. Right now, dtype('c') is
http://scipy.org/scipy/numpy/newticket#preview is giving me:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and inform them
of the time the error occurred, and
from numpy import array
a = array((1.0, 2.0))
b = c = 15
b = b*a#ok
c *= a#ok
d = array(15)
e = array(15)
d = d*a#this works ok
e *= a#this intended to be same as prev line, but yields error:
Traceback (innermost last):
File stdin, line 1, in module
ValueError: invalid return array shape
Alan G Isaac wrote:
On Thu, 07 Feb 2008, dmitrey apparently wrote:
a = array((1.0, 2.0))
e = array(15)
e *= a # ... yields error:
You are trying to stuff in two values where
you have only allocated space for 1.
Exactly. but to expound a bit more:
The ?= operators are in-place operators
Hi,
OK, i'm using:
In [6]: numpy.__version__
Out[6]: '1.0.3'
Should I try the development version? Which version of numpy would
people generally recommend?
James
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
Hi,
The following gives the wrong answer:
In [2]: A = array(['a','aa','b'])
In [3]: B = array(['d','e'])
In [4]: A.searchsorted(B)
Out[4]: array([3, 0])
The answer should be [3,3]. I've come across this while trying to come
up with an ismember function which works for strings (setmember1d
Hi,
I have one short question, a possible bug report, and one longer question:
1. (short question)
Which mailing list is appropriate for f2py discussion:
numpy-discussion or f2py-users?
2. (bug report?)
I'm using numpy from svn (revision 4410). When using f2py to compile,
I got an error
I note a small inconsistency in the use of the out keyword in some
functions:
a=array(0)
sometrue([1],out=a).shape
()
a=array([0])
sometrue([1],out=a).shape
(1,)
a=array([[0]])
sometrue([1],out=a).shape
(1, 1)
a=array([[0,0]])
sometrue(eye(2),axis=1,out=a).shape
(1, 2)
It seems to me
Bug
===
In [8]: N.info(N.ones(3))
class: ndarray
shape: (3,)
strides: (8,)
itemsize: 8
aligned: True
contiguous: True
fortran: True
---
TypeError Traceback (most recent call last)
Fernando Perez wrote:
Question
any objection if I commit this? Since I don't really touch the
codebase often, I'd rather ask the real core people. I also don't
know if it's really the right thing to do, I just tabbed into the
object and picked what seemed to be the most
Numpy's any() function gives unintuitive results when given a generator
rather than a sequence:
import numpy as N
N.any( i 0 for i in range(3) )
True
If the generator is instead given as a list (using a list
comprehension), then the expected answer is given:
N.any( [i 0 for i in range(3)]
Matthew Koichi Grimes wrote:
Is this a bug? It seems like having to generate a whole list before
calling any() defeats the whole appeal of using any() in the first
place; namely that it'll exit on the first False returned by the
generator, without going through the rest of the elements.
No,
101 - 168 of 168 matches
Mail list logo