[Announce] Numerical Python 22.0
![](https://secure.gravatar.com/avatar/56475d2e8acb48b4308f609982f94440.jpg?s=120&d=mm&r=g)
Numerical Python release 22.0 is at Sourceforge. A Windows installer and source zip are also available. Version 22.0 a. Changed multiarraymodule functions to accept keywords where documentation implies it through the use of optional variables. Specifically in multiarray: zeros, take, transpose, repeat, set_string_function, cross_correlate. in ufuncobject: reduce and accumulate now take keyword arguments for the optional axis argument. b. Added support for unsigned shorts 'w' and unsigned ints 'u' -- Travis Oliphant with help from Darren Hart and F. Oliver Gathmann. Increased max permissible iterations in SVD for supplied lapack. -- Dubois Recoded RandomArray.randint to try to see if we can work around bug on some platforms. -- Dubois Version 21.3 June 8, 2002 Fixed bugs: [ #557927 ] fixed matrix slice assignment [ #552922 ] added check for correct datatype in .astype() method. Created new API PyArray_ValidType to handle this check here as well as in multiarraymodule.c [ #551808 ] fixed segfault with unicode array (Travis O.) [ #559511 ] MLab.std now works for axis != 0 (Travis O.) [ #542979 ] sum returns exception tuple [ #528328 ] true division operators used to return single precision on division of integers and longs --- now defaults to double precision (but only on int and long division --- still single-precision for ubyte, short, and byte division. [ none ] arange(start, end, step) slightly different near end points than start + arange(0, N)*step where N is the length. [ none ] a = zeros(2,'D'); a[0] = array(0.0+0.6j) would not work. (Assigning a rank-0 array did not work for CFLOAT_setitem or CDOUBLE_setitem. [ 530688 ] Python crash when transposing array (Walter Moreira) Version 21.0 March 13, 2002 Fixed bugs: [ #482603 ] Memory leak in MA/Numeric/Python Reported by Reggie Dugard. Turned out to be *two* memory leaks in one case in a routine in Numeric, array_objectype. (Dubois) [ none ] if vals was a null-array array([]) putmask and put would crash. Fixed with check. [ #469951 ] n = n1[0] gives array which shares dimension of n1 array. This causes bugs if shape of n1 is changed (n didn't used to have it's own dimensions array (Travis Oliphant) [ #514588 ] MLab.cov(x,x) != MLab.cov(x) (Travis Oliphant) [ #518702 ] segfault when invalid typecode for asarray (Travis Oliphant) [ #497530 ] MA __getitem__ prevents 0 len arrays (Reggie Duggard) [ #508363 ] outerproduct of noncontiguous arrays (Martin Wiechert) [ #513010 ] memory leak in comparisons (Byran Nollett) [ #512223 ] Character typecode not defined (Jochen Kupper) [ #500784 ] MLab.py diff error (anonymous, fixed by Dubois) [ #503741 ] accuracy of MLab.std(x) (Katsunori Waragai) [ #507568 ] overlapping copy a[2:5] = a[3:6] Change uses of memcpy to memmove which allows overlaps. [ numpy-Patches-499722 ] size of buffer created from array is bad (Michel Sanner). [ #502186 ] a BUG in RandomArray.normal (introduced by last bug fix in 20.3) (Katsunori Waragai). Fixed errors for Mac (Jack Jensen). Make rpm's properly, better Windows installers. (Gerard Vermeulen) Added files setup.cfg; setup calculates rpm_install.sh to use current Python. New setup.py, eliminate setup_all.py. Use os.path.join everywhere. Revision in b6 added file README.RPM, further improvements. Implement true division operations for Python 2.2. (Bruce Sherwood) Note: true division of all integer types results in an array of floats, not doubles. This decision is arbitrary and there are arguments either way, so users of this new feature should be aware that the decision may change in the future. New functions in Numeric; they work on any sequence a that can be converted to a Numeric array. Similar change to average in MA. (Dubois) def rank (a): "Get the rank of a (the number of dimensions, not a matrix rank)" def shape (a): "Get the shape of a" def size (a, axis=None): "Get the number of elements in a, or along a certain axis." def average (a, axis=0, weights=None, returned = 0): """average(a, axis=0, weights=None) Computes average along indicated axis. If axis is None, average over the entire array. Inputs can be integer or floating types; result is type Float. If weights are given, result is: sum(a*weights)/(sum(weights)) weights must have a's shape or be the 1-d with length the size of a in the given axis. Integer weights are converted to Float. Not supplying weights is equivalent to supply weights that are all 1. If returned, return a tuple: the result and the sum of the weights or count of values. The shape of these two results will be the same. raises ZeroDivisionError if appropriate when result is scalar. (The version in MA does not -- it returns masked values). """
participants (1)
-
Paul F Dubois