[Numpy-discussion] Digests (was Re: mysql -> record array)

2006-11-17 Thread Robert Kern
tions/numpy-discussion Then log in and change your options. I'm not sure what else you might mean. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an und

Re: [Numpy-discussion] mysql -> record array

2006-11-18 Thread Robert Kern
e side effect of migrating the list from Sourceforge. The only thing we could export is the subscription list, not everyone's options. See my earlier post on how to reset your options. http://projects.scipy.org/pipermail/numpy-discussion/2006-November/024731.html -- Robert Kern "I have come

Re: [Numpy-discussion] changeset 3439 breaks Python 2.3 numpy build

2006-11-18 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hi, > > http://projects.scipy.org/scipy/numpy/changeset/3439 > > uses Py_CLEAR that was introduced in Python 2.4. > > Shall we drop Python 2.3 support? Please, no. -- Robert Kern "I have come to believe that the whole world is an enigma,

Re: [Numpy-discussion] numpy.random.shuffle

2006-11-22 Thread Robert Kern
-dim arrays (N > 1), x[i] is a *view* into the array. By the time that x[j] = x[i] gets executed, x[i] = x[j] has already executed and the underlying memory that x[i] points to has been modified. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enig

Re: [Numpy-discussion] numpy.random.shuffle

2006-11-22 Thread Robert Kern
Christopher Barker wrote: > Robert Kern wrote: >> This is really a thinko on my part. > > What, exactly, is a thinko? Like a typo except that the fault lies with the brain, not the fingers. >> I copied the algorithm from Python's random >> module. At

Re: [Numpy-discussion] numpy.random.shuffle

2006-11-22 Thread Robert Kern
Tim Hochberg wrote: > Robert Kern wrote: >> One possibility is to check if the object is an ndarray (or subclass) and use >> .copy() if so; otherwise, use the current implementation and hope that you >> didn't pass it a Numeric or numarray array (or some other view-base

Re: [Numpy-discussion] numpy.random.shuffle

2006-11-22 Thread Robert Kern
Christopher Barker wrote: > Robert Kern wrote: >> I don't want to assume that the only two sequence types are lists and arrays. > > Does numpy.random.shuffle really have to work on any sequence? and > without making a copy? I'm not so sure -- having num* functions op

Re: [Numpy-discussion] Installing CVXOPT

2006-11-24 Thread Robert Kern
tarball from this page: http://www.ee.ucla.edu/~vandenbe/cvxopt/ It includes installation instructions. If you need help, I recommend that you ask the authors. Their email addresses are on that page. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless eni

Re: [Numpy-discussion] can int and float exists in one array?(about difference in indexing Matlab matrix and Numpy array)

2006-11-27 Thread Robert Kern
ues into an array with floating point values, you are doing something wrong. At least, you are trying to use Matlab idioms that simply aren't used in Python or numpy. We can't tell you how to "translate" the Matlab idioms into Python idioms without knowing what you intended to

Re: [Numpy-discussion] numpy: azip ?

2006-11-28 Thread Robert Kern
numpy. column_stack() -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco ___ Numpy-discussion

Re: [Numpy-discussion] int32 twice in sctypes?

2006-11-28 Thread Robert Kern
different (although they represent the same information). In [38]: import numpy In [39]: id(numpy.dtype('p').type) Out[39]: 62091392 In [40]: id(numpy.int32) Out[40]: 62091200 I'm not entirely sure why this is. -- Robert Kern "I have come to believe that the whole

Re: [Numpy-discussion] atol in allclose

2006-11-28 Thread Robert Kern
absolute(y)) rtol was never intended to be less than the epsilon of your chosen floating point type much less 0. That's what == is for. That said, less() should probably be less_equal(), and the docstring can be clearly describe what is going on. -- Robert Kern "I have come to believ

Re: [Numpy-discussion] dtype inconsistancy?

2006-11-29 Thread Robert Kern
dtype=float32) In [4]: array([ 1.], dtype=float32) --- Traceback (most recent call last) /Users/rkern/src/wsgiref/ in () : name 'array' is not defined -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] insanely slow writing to memory mapped array

2006-11-29 Thread Robert Kern
-contained script that demonstrates the issue so we can experiment and try things out on different machines? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as tho

Re: [Numpy-discussion] array with object

2006-11-30 Thread Robert Kern
## > > Is it expected ? Yes. When object arrays (or record arrays with object columns) are involved, it is extremely difficult for array() to know what you want to be in the array and what is simply "structure". Remember that array() is trying to divine both the s

Re: [Numpy-discussion] extremely slow array indexing?

2006-11-30 Thread Robert Kern
small, self-contained script with fake data that we can run? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _

Re: [Numpy-discussion] extremely slow array indexing?

2006-11-30 Thread Robert Kern
rSum array for every row. Try using currSum += row -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Numpy-discussion] atol in allclose

2006-11-30 Thread Robert Kern
Charles R Harris wrote: > I think that's right. Do you want to make the change? Done. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth.&

Re: [Numpy-discussion] strange behavior with a numpy array as member of a list

2006-11-30 Thread Robert Kern
Tim Hirzel wrote: > Does this seem odd to anyone else? I am not sure about the > implementation of 'in' but it seems like a comparison is going funny > somewhere. Or I am missing something... Yes, list.__contains__ uses equality to test for membership, not identity. -- R

Re: [Numpy-discussion] strange behavior with a numpy array as member of a list

2006-11-30 Thread Robert Kern
y_XDECREF(array_other); PyErr_Clear(); Py_INCREF(Py_False); return Py_False; } } -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: [Numpy-discussion] strange behavior with a numpy array as member of a list

2006-11-30 Thread Robert Kern
Christopher Barker wrote: > > Robert Kern wrote: > >>> What determines if an array tests for equality as the entire array or >>> element-wise? >> There are some special cases for backwards compatibility. > > with what? > > IIRC, Numeric has rais

Re: [Numpy-discussion] seting the dtype for where...

2006-12-01 Thread Robert Kern
=float32) + 0).dtype Out[6]: dtype('float64') float64 is the lowest floating point dtype that can hold the full range of int32 values (much less int64) without losing precision. Since both operands ("coercands"?) are scalars, they both get a say in the final dtype (unlike a full

Re: [Numpy-discussion] efficient way to get first index of first masked/non-masked value in a masked array

2006-12-01 Thread Robert Kern
or("no masked data") first_unmasked() is left as an exercise for the reader. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying tru

Re: [Numpy-discussion] take semantics (bug?)

2006-12-03 Thread Robert Kern
] == a[0]. .take() doesn't; it simply tries to convert its argument into an array. It can convert (array([0, 1, 2]),) into array([[0, 1, 2]]), so it does. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terribl

Re: [Numpy-discussion] Numpy and Python 2.2 on RHEL3

2006-12-05 Thread Robert Kern
her somehow. numpy requires Python 2.3 . -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco __

Re: [Numpy-discussion] take semantics (bug?)

2006-12-05 Thread Robert Kern
Michael McNeil Forbes wrote: > Robert Kern <[EMAIL PROTECTED]> wrote: >> Michael McNeil Forbes wrote: >>> What are the semantics of the "take" function? >>> >>> I would have expected that the following have the same shape and size: >>>

Re: [Numpy-discussion] equivalent to isempty command in matlab (newbie question)

2006-12-06 Thread Robert Kern
t does not... > so in this case I've solve the problem.. but is there an equivalent for > isempty matlab command in numpy ? Use (len(s3) != 0) instead of (s3 != []). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible b

Re: [Numpy-discussion] equivalent to isempty command in matlab (newbie question)

2006-12-06 Thread Robert Kern
Filip Wasilewski wrote: > Just like for other Python objects: > > if ifs3: >print "not empty" No, that doesn't work. numpy arrays do not have a truth value. They raise an error when you try to use them in such a context. -- Robert Kern "I have come to be

Re: [Numpy-discussion] Future Python 2.3 support ? - Re: Numpy and Python 2.2 on RHEL3

2006-12-07 Thread Robert Kern
Robert wrote: > Robert Kern wrote: >> numpy requires Python 2.3 . > > hope Python2.3 support will not be dropped too early. There is not much cost > overall when going from 2.2 to 2.3. It won't. -- Robert Kern "I have come to believe that the whole world is an eni

Re: [Numpy-discussion] shuffle bug

2006-12-08 Thread Robert Kern
Tom Holroyd wrote: > This is certainly a bug. It has been mentioned before, but there > was no comment. Yes, there was. http://projects.scipy.org/pipermail/numpy-discussion/2006-November/024783.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harm

Re: [Numpy-discussion] a==b for numpy arrays

2006-12-11 Thread Robert Kern
27; truth value was the same as Numeric.sometrue(arr). It is likely that your unit tests were expecting (a == b) to be the same as Numeric.alltrue(a == b). Since this is not the case, your unit tests had bugs. -- Robert Kern "I have come to believe that the whole world is an enigma, a h

Re: [Numpy-discussion] a==b for numpy arrays

2006-12-11 Thread Robert Kern
Abel Daniel wrote: > Robert Kern gmail.com> writes: > >> Abel Daniel wrote: >>> Now, I think that having a way of getting an element-wise comparison >>> (i.e. getting an array of bools) is great. _But_ why make that the >>> result of a '=='

Re: [Numpy-discussion] Can we change how fortran compiler version strings are handled?!

2006-12-14 Thread Robert Kern
Brian Granger wrote: > Can we please change how Numpy handles the version string of fortran > compilers? Yes, please. I'll be happy to apply any patch you might provide for this. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that

Re: [Numpy-discussion] migrating to numpy

2006-12-15 Thread Robert Kern
e sample chapters covers this. http://www.tramy.us/numpybooksample.pdf -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying tr

Re: [Numpy-discussion] Automatic matrices

2006-12-15 Thread Robert Kern
def foo(input): input_arr = asanyarray(input) wrapper = input_arr.__array_wrap__ input_arr = asarray(input_arr) # Do stuff on input_arr to get output_arr (an ndarray). return wrapper(output_arr) -- Robert Kern "I have come to believe that the whole world is a

Re: [Numpy-discussion] sum of two arrays with different shape?

2006-12-17 Thread Robert Kern
of convenience. The following wiki page has an explanation of the broadcasting rules: http://www.scipy.org/EricsBroadcastingDoc It still refers to Numeric, numpy's predecessor, but the concepts still apply (change "Numeric" to "numpy" and "NewAxis" to "

Re: [Numpy-discussion] sum of two arrays with different shape?

2006-12-18 Thread Robert Kern
; May be the broadcast feature > should be limited in a certain range not to mess normal operation. Broadcasting is really a fundamental feature of numpy. It *is* normal operation as much as anything else is. -- Robert Kern "I have come to believe that the whole world is an enigma, a

Re: [Numpy-discussion] slow numpy.clip ?

2006-12-19 Thread Robert Kern
ar is certainly a better approach, and I can see no drawbacks to it. If anyone is up to translating their faster clip() into C, I'm more than happy to check it in. I might also entertain adding a copy=True keyword argument, but I'm not entirely certain we should be expanding the API duri

Re: [Numpy-discussion] slow numpy.clip ?

2006-12-19 Thread Robert Kern
ly new function. In that case, it certainly must make a copy. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _

Re: [Numpy-discussion] (no subject)

2006-12-19 Thread Robert Kern
of the document would be useful. > Thank you. They are both BSD-like licenses. http://projects.scipy.org/scipy/numpy/browser/trunk/LICENSE.txt http://projects.scipy.org/scipy/scipy/browser/trunk/LICENSE.txt -- Robert Kern "I have come to believe that the whole world is an enigma, a harml

Re: [Numpy-discussion] slow numpy.clip ?

2006-12-19 Thread Robert Kern
; argument. Currently, this is only set to something other than NULL if explicitly provided as a keyword "out=" argument to numpy.ndarray.clip(). All we have to do is modify the implementation of array_clip() to parse a "copy=" argument and set "out = self" before callin

Re: [Numpy-discussion] slow numpy.clip ?

2006-12-19 Thread Robert Kern
Travis Oliphant wrote: > There are a lot of functions that are essentially this. Many things > were done to just get something working. It would seem like a good idea > to re-code many of these to speed them up. Off the top of your head, do you have a list of these? -- Robert Kern

Re: [Numpy-discussion] slow numpy.clip ?

2006-12-19 Thread Robert Kern
Tim Hochberg wrote: > Robert Kern wrote: >> Travis Oliphant wrote: >> >>> The problem with the copy=True keyword is that it would imply needing to >>> expand the C-API for PyArray_Clip and should not be done until 1.1 IMHO. >>> >>

Re: [Numpy-discussion] Newbie Question, Probability

2006-12-20 Thread Robert Kern
e=1.0) Out[2]: array(0.058440944333451469) In [3]: stats.norm.cdf(1.96, loc=0.0, scale=1.0) Out[3]: array(0.97500210485177952) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as t

Re: [Numpy-discussion] A question about argmax and argsort

2006-12-20 Thread Robert Kern
, x[ax-3]] > 1, 5, 3 > > Or am I once again missing the point entirely ? There are algorithms that can be faster if you can ignore the bulk of the irrelevant data. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] Newbie Question, Probability

2006-12-21 Thread Robert Kern
ges, and run setup() with the appropriate parameters to build an egg for each collection. However, build/ apparently needs to be cleaned out between each egg, otherwise you contaminate later eggs. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: [Numpy-discussion] slow numpy.clip ?

2006-12-22 Thread Robert Kern
want to think about. #including separate .c files, leaving the extension alone, is best, IMO. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as t

Re: [Numpy-discussion] Newbie Question, Probability

2006-12-22 Thread Robert Kern
honestly, the more I see the latter, the less motivated I am to bother with the former. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as thou

Re: [Numpy-discussion] Newbie Question, Probability

2006-12-22 Thread Robert Kern
y popular among my students) you'll have only the > few that are not intimidated by building SciPy (which still > has no intaller for Python 2.5). You mean a Windows installer? Yes, it does. http://sourceforge.net/project/showfiles.php?group_id=27747 -- Robert Kern "I have

Re: [Numpy-discussion] Newbie Question, Probability

2006-12-22 Thread Robert Kern
vided with the OS and is automatically recognized by numpy.distutils. It's missing the C versions of LAPACK functions, so scipy.linalg.clapack will be empty. Also, I think numpy.distutils won't recognize that it is otherwise an ATLAS (_ATL_buildinfo is also missing from the framework), s

Re: [Numpy-discussion] which fft I should use

2006-12-27 Thread Robert Kern
vailable and numpy.fft otherwise. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco __

Re: [Numpy-discussion] Newbie Question, Probability

2006-12-27 Thread Robert Kern
f libs to > support stuff that Fortran had that C didn't -- complex numbers come to > mind, I'm not sure what else was is in libf2c. > > In fact, I've often wondered why scipy doesn't use f2c. Generally speaking, g77 was always more likely to work on more platforms with le

Re: [Numpy-discussion] numpy install on mac os x 10.4

2006-12-30 Thread Robert Kern
install creates > have macosx-10.3 in them (as opposed to 10.4), e.g. > >creating /Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/numpy-1.0.1-py2.4-macosx-10.3-fat.egg > > Is this something I should be concerned about? No. -- Robert Kern

Re: [Numpy-discussion] The risks of empty()

2007-01-02 Thread Robert Kern
#x27;ignore') # Do stuff that might generate spurious warnings. seterr(**olderrstate) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umbert

Re: [Numpy-discussion] ndarray newbie question

2007-01-04 Thread Robert Kern
things, > e.g. > > dir(m) > > produces a slew of components, e.g. > > tofile, ..., transpose, ..., view, etc. Most types defined in C do not have a .__dict__ . In [1631]: s = 1 In [1632]: s.__dict__ ---

Re: [Numpy-discussion] How do I test if an array contains NaN ?

2007-01-04 Thread Robert Kern
4]: isnan? Type: ufunc Base Class: Namespace: Interactive Docstring: y = isnan(x) returns True where x is Not-A-Number In [1635]: isfinite? Type: ufunc Base Class: Namespace: Interactive Docstring: y = isfinite(x) returns True where x is finite --

Re: [Numpy-discussion] compress numpy vs .numarray

2007-01-04 Thread Robert Kern
implicit, just flatten the condition mask. > What does axis=None mean in this case !? That the condition mask applies to the flattened array. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpr

Re: [Numpy-discussion] compress numpy vs .numarray

2007-01-04 Thread Robert Kern
Sebastian Haase wrote: > Is N.extract() the equivalent of numarray.compress() ? Only for the specific flattening behavior that you are talking about. However, numpy.extract() does not have the axis= argument that numarray.compress() does. -- Robert Kern "I have come to believe

Re: [Numpy-discussion] ndarray newbie question

2007-01-05 Thread Robert Kern
t; Docstring: > > > > Did you have something else in mind? The ?s were not literal. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying tr

Re: [Numpy-discussion] ndarray newbie question

2007-01-05 Thread Robert Kern
.__doc__?". a.__class__.__doc__ is a string, so interrogating it with ? will tell you information about strings rather than a.__class__ . -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to inte

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Robert Kern
-dimensional, for example. Sure, but you need a standard way to communicate that extra information between different parts of your code and also between different third party libraries. That is what this PEP intends to provide. -- Robert Kern "I have come to believe that the whole world is an eni

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-05 Thread Robert Kern
numpy/changeset/3361 Tagging the 1.0 release: http://projects.scipy.org/scipy/numpy/changeset/3396/tags/1.0 Are you sure that you weren't upgrading from a beta instead of the 1.0 release? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that

Re: [Numpy-discussion] x[None] changes x.shape

2007-01-05 Thread Robert Kern
use that would return the > entire x array and have x.shape be (n,)? def foo(x, sel=None): if sel is None: return sel else: return x[sel] -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our ow

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-05 Thread Robert Kern
d way of building Python extension modules. What packages do you want help with building from source? Which build instructions have you read? What issues still remain unclear for you after having read them? What platforms are you concerned with? -- Robert Kern "I have come to believe that the who

Re: [Numpy-discussion] Advanced selection, duplicate indices, and augmented assignment

2007-01-06 Thread Robert Kern
hberg's and my posts in the thread "Histograms via indirect index arrays" for more details. http://projects.scipy.org/pipermail/numpy-discussion/2006-March/thread.html#6877 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is

Re: [Numpy-discussion] Exported symbols and code reorganization.

2007-01-07 Thread Robert Kern
functions are implemented in files other than the C file that contains the Python module code. In order for them to be called from the Python module code, they need to be exported, IIRMCC (If I Remember My C Correctly). This appears to be true of essentially every other extension module in my sit

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-07 Thread Robert Kern
ib/freetype219', '/usr/local', +'darwin' : ['/opt/local', '/usr/local', '/usr', '/sw'], 'freebsd4' : ['/usr/local', '/usr'], 'freebsd5' : ['/usr/local',

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-08 Thread Robert Kern
eading symbols for shared libraries .. done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-08 Thread Robert Kern
On 1/8/07, Robert Kern <[EMAIL PROTECTED]> wrote: > * I use MacPorts to install the other dependencies. > > $ sudo port install libjpeg > $ sudo port install libpng > $ sudo port install libfreetype I beg your pardon, this is actually $ sudo port install jpeg $ sud

Re: [Numpy-discussion] reduction

2007-01-08 Thread Robert Kern
Charles R Harris wrote: > Or maybe not a bug. It depends on what reduce means for this operation. > So either a bug or something that could use a bit of documentation. Numeric gives the expected answer, so this is a bug in numpy. -- Robert Kern "I have come to believe that the who

Re: [Numpy-discussion] reduction

2007-01-08 Thread Robert Kern
lorenzo bolla wrote: > I'm very happy to help: just tell me how to "file a ticket"! (what does > it mean, by the way?). Don't worry. I took care of it. http://projects.scipy.org/scipy/numpy/ticket/413 -- Robert Kern "I have come to believe that the whole

Re: [Numpy-discussion] reduction

2007-01-08 Thread Robert Kern
lorenzo bolla wrote: > ops. I did it, too. > should I delete it?? how?? I closed it as a duplicate. As a nondeveloper, you don't have the permissions to close tickets yourself. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Robert Kern
Sebastian Haase wrote: > I would suggest treating this as a real bug! > Then it could be fixed immediately. Deliberate design decisions don't turn into bugs just because you disagree with them. Neither do those where the original decider now disagrees with them. -- Robert Kern &quo

Re: [Numpy-discussion] discussion about array.resize() -- compare to numarray

2007-01-08 Thread Robert Kern
Sebastian Haase wrote: > On 1/8/07, Robert Kern <[EMAIL PROTECTED]> wrote: >> Sebastian Haase wrote: >> >>> I would suggest treating this as a real bug! >>> Then it could be fixed immediately. >> Deliberate design decisions don't turn into bugs j

Re: [Numpy-discussion] Where's append in NumPy??

2007-01-08 Thread Robert Kern
3493-py2.5-macosx-10.4-i386.egg/numpy/lib/function_base.py Definition: numpy.nansum(a, axis=None) Docstring: Sum the array over the given axis, treating NaNs as 0. In [4]: print numpy.__version__ 1.0.2.dev3493 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmles

Re: [Numpy-discussion] Where's append in NumPy??

2007-01-08 Thread Robert Kern
Lou Pecora wrote: > After import numpy as N > > In [10]: print N.__version__ > 1.1.2881 > > does that look right as a recent version? No, that's very old. The version number had briefly gotten bumped to 1.1 in the repository, but we backed that out quickly. -- Rober

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-08 Thread Robert Kern
belinda thom wrote: > Perhaps I should attempt to install matplot lib at this point---I > don't know. Any idea if the FAILUREs I'm seeing are a problem? No, they're not. One has been fixed in SVN, and the other two are known bugs probably related to gfortran. -- Robert

[Numpy-discussion] Note to developers: Pyrex, Python 2.5, and exceptions

2007-01-08 Thread Robert Kern
des a fix for this: http://codespeak.net/svn/lxml/pyrex/ When regenerating mtrand.c from mtrand.pyx, please use this version instead of the official version. Thank you. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: [Numpy-discussion] defmatrix.sum

2007-01-08 Thread Robert Kern
sum() still return a value? Yes. Everything else with an out= parameter does. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-09 Thread Robert Kern
butt and open for misinterpretation. Just edit that one line. Ignore the diff header if you don't understand it. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to in

Re: [Numpy-discussion] Where's append in NumPy?? Can't Installing NumPy.

2007-01-09 Thread Robert Kern
needed for binary module after numpy 1.0". -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco ___

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-09 Thread Robert Kern
lib (compatibility version 1.0.0, current version 88.3.3) /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made te

Re: [Numpy-discussion] Getting 3-D array values from a 2-D array of indexes

2007-01-09 Thread Robert Kern
0, 31, 12, 33, 54], [35, 16, 37, 58, 39]]) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _

Re: [Numpy-discussion] Python EM Project

2007-01-10 Thread Robert Kern
to host it > is now a bunch of ads, property > of DomainDrop. Also Robert Lytle, who seemed to be "responsible" for the > project, cannot be contacted via e-mail. I don't think anyone else knows, either. -- Robert Kern "I have come to believe that the whole world i

Re: [Numpy-discussion] Exported symbols and code reorganization.

2007-01-10 Thread Robert Kern
provision in Python for safely unloading a C extension module, so we simply presume that sys.modules always holds a reference to the imported module and doesn't let it get garbage collected. People who futz with that get the segfaults they deserve. ;-) -- Robert Kern "I have come to

Re: [Numpy-discussion] Docstring standards for NumPy and SciPy

2007-01-10 Thread Robert Kern
g docstring information already extract this data (help(), pydoc, epydoc, IPython's ? operator). Again, how are you viewing docstrings that you don't see this information already? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is

Re: [Numpy-discussion] random permutation

2007-01-11 Thread Robert Kern
Keith Goodman wrote: > Why is the first element of the permutation always the same? Am I > using random.permutation in the right way? >>> M.__version__ > '1.0rc1' This has been fixed in more recent versions. http://projects.scipy.org/scipy/numpy/ticket/374 --

Re: [Numpy-discussion] Warning messages after upgrading to 1.0.1

2007-01-11 Thread Robert Kern
iply > > What's a good way to turn off the warnings? seterr(all='ignore') -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it

Re: [Numpy-discussion] No test file found

2007-01-11 Thread Robert Kern
e modules which should have test coverage don't. Unfortunately, it's difficult to extract those from all of the false positives. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it

Re: [Numpy-discussion] failed to build numpy and Numeric in Windows

2007-01-12 Thread Robert Kern
. That doesn't explain or solve the problem that you state, but if the problem is restricted to MSVS2005, it may not be worth solving. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-13 Thread Robert Kern
Erin Sheldon wrote: > On 1/9/07, Robert Kern <[EMAIL PROTECTED]> wrote: >> Erin Sheldon wrote: >>> I'm finally getting to this, I'm on the road. Here is >>> what gdb gives me >>> >>> --snip-- >>> Reading symbols for s

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-13 Thread Robert Kern
Erin Sheldon wrote: > On 1/13/07, Robert Kern <[EMAIL PROTECTED]> wrote: > --snip-- >> Now, since the bug is actually in freetype, not matplotlib or numpy, I >> suggest >> finding a new build of freetype. I use MacPorts and have had absolutely no >> trouble

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Robert Kern
I implemented the distributions, but I can't really turn those into unit tests for numpy. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth.

Re: [Numpy-discussion] Fast clip for native types, 2d version

2007-01-14 Thread Robert Kern
umpy.float64(5), numpy.float64(6)).dtype Out[4]: dtype('float32') In [5]: a.clip(numpy.ones(101, dtype=numpy.float64), numpy.float64(6)).dtype Out[5]: dtype('float64') The int32/float32 failure is odd, though. -- Robert Kern "I have come to believe that the whole world

Re: [Numpy-discussion] Fast clip for native types, 2d version

2007-01-14 Thread Robert Kern
David Cournapeau wrote: > Robert Kern wrote: >> David Cournapeau wrote: >> >>> 2: the old implementation does not upcast the input array. If the >>> input is int32, and min/max are float32, the function fails; if input is >>> float32, and min/max float64

Re: [Numpy-discussion] Fast clip for native types, 2d version

2007-01-14 Thread Robert Kern
David Cournapeau wrote: > Robert Kern wrote: >> David Cournapeau wrote: >>> Robert Kern wrote: >>>> David Cournapeau wrote: >>>> >>>>> 2: the old implementation does not upcast the input array. If the >>>>> input is int32

Re: [Numpy-discussion] weird numpy.any() behavior; bug, or 6-legged feature?

2007-01-16 Thread Robert Kern
type; that's why you get the result that you do. Most numpy functions operate on arrays or things that can be turned into arrays. They don't operate in ideal ways on every kind of object that you might throw at them. -- Robert Kern "I have come to believe that the whole world is an e

Re: [Numpy-discussion] numpy.random.permutation bug?

2007-01-18 Thread Robert Kern
Keith Goodman wrote: > I don't think that bug is particular to int32. For example: > >>> numpy.random.permutation(1.2) > TypeError: len() of unsized object Well, that should raise an error, though maybe not that error. -- Robert Kern "I have come to believe that

Re: [Numpy-discussion] numpy.random.permutation bug?

2007-01-18 Thread Robert Kern
Emanuele Olivetti wrote: > permutation() likes 'int' and dislikes 'numpy.int32' integers :( > Seems a bug. Yup. I should get around to fixing it later tonight. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that

Re: [Numpy-discussion] numpy.random.permutation bug?

2007-01-18 Thread Robert Kern
Keith Goodman wrote: > On 1/18/07, Robert Kern <[EMAIL PROTECTED]> wrote: >> Keith Goodman wrote: >>> I don't think that bug is particular to int32. For example: >>> >>>>> numpy.random.permutation(1.2) >>> TypeError: len() of unsize

  1   2   3   4   5   6   7   8   9   10   >