[pypy-commit] pypy python-numpy: blindly copy all *.py files from...
Takes an arbitrary Python function and returns a Numpy ufunc. + + Can be used, for example, to add broadcasting to a built-in Python + function (see Examples section). + +
Takes an arbitrary Python function and returns a Numpy ufunc. + + Can be used, for example, to add broadcasting to a built-in Python + function (see Examples section). + +
In the prototype branch, ``np.strings.encode`` emits a ``DeprecationWarning`` for StringDType input when the new ``dtype=`` argument is unspecified. Until the default flips to ByteStringDType in a later release, its behavior is otherwise unchanged: fixed-width ``S`` result, full codec and error-mode support, and 0-d arrays for 0-d input.
How to apply _cos lookup to each element of an integer array: > > phase = np.array (..., dtype =int) > cos_out = lookup (phase, _cos) ??? Turns out that if A is an np.array and B is an np.array, then A[B] will do exactly what I wanted. Is this mentioned anywhere in the documentation?
Next message: [pypy-commit] pypy numpy-dtype-alt: update TODO Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
from numpy import array, dtype, int_.if decimals != 0: - # numpy incompatible message - raise oefmt(self.space.w_TypeError, - "Cannot use float math on bool dtype") + # numpy 1.9.0 compatible + return v.
Creating such arrays via ``np.array ( [<ragged_nested_sequence>])`` with no ``dtype`` keyword argument will today default to an ``object``-dtype array. Change the behaviour to raise a ``ValueError`` instead.
Here is an example to demonstrate my problem (using numpy to avoid needing an image file, and to make it easier to show the results in text; you could instead use a 4x4 image and the .show() method of Image to see what I'm talking about)
Here's a toy example: ### >>> def add (x, y=None): ... if y == None: y = 0 ... return x + y ... >>> apply (add, [1, 2]) 3 >>> apply (add, [1]) 1 ### apply () is specifically designed for this kind of stuff, where the second argument is a list that will be used for the arguments of a function.
Previous message (by thread): [Numpy-discussion] saving masked array to a text file.Hello, > Is there a function like savetxt that can deal with missing values in > masked arrays? I'd like to control the way the missing values are > written to the file. >
Dec 10, 2004 · Are you using numarray? If so, there appears to be a max method of an array, so you can try b = array ( [ [1,2], [3,4]]) b.max () Note that your method of finding the max row, then finding the max in the row, will not in general give the correct result.
Dec 13, 2002 · Value names can contain any 2-byte character from 1 through > 65535. Key names have an additional restriction that they cannot contain > a backslash. > > _winreg.EnumValue doesn't return value names correctly if any of the > characters are above 255. _winreg.QueryValueEx raises an exception if > it is passed a name with values above 127 ...