The NetBSD Project

CVS log for pkgsrc/math/py-numpy/Makefile

[BACK] Up to [] / pkgsrc / math / py-numpy

Request diff between arbitrary revisions

Default branch: MAIN

Revision 1.60 / (download) - annotate - [select for diffs], Wed Apr 24 10:09:59 2019 UTC (46 hours, 4 minutes ago) by adam
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

py-numpy: updated to 1.16.3

Pull requests merged
BUG: Fixes to numpy.distutils.Configuration.get_version
BUG: Fix errors in string formatting while producing an error
BUG: Convert fortran flags in environment variable
BUG: Remove error-prone borrowed reference handling
BUG: Add error checks when converting integers to datetime types
BUG: Remove our patched version of `distutils.split_quoted`
BUG: Fix testsuite failures on ppc and riscv
BUG: Fix parameter validity checks in ``random.choice``
BUG: Ensure linspace works on object input.
BLD: fix include list for sdist building.
BUG: __array_interface__ offset was always ignored
MAINT: f2py: Add a cast to avoid a compiler warning.
BUG, MAINT: fix reference count error on invalid input to ndarray.flat
ENH: Cast covariance to double in random mvnormal
BUG: Fix null pointer dereference in PyArray_DTypeFromObjectHelper
BUG: Use C call to sysctlbyname for AVX detection on MacOS.
BUG: Fix crash when calling savetxt on a padded array
BUG: iteration variable size fix
DOC: Add as_ctypes_type to the documentation
BUG: Return the coefficients array directly
BUG/MAINT: Tidy typeinfo.h and .c
BUG: Make allow_pickle=False the default for loading
DOC: fix some doctest failures
BUG/MAINT: Tidy typeinfo.h and .c
BLD: address mingw-w64 issue. Follow-up to gh-9977
REL: Prepare for the NumPy release.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Mar 4 09:09:46 2019 UTC (7 weeks, 3 days ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2019Q1-base, pkgsrc-2019Q1
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

py-numpy: updated to 1.16.2

TST: fix vmImage dispatch in Azure
MAINT: remove complicated test of multiarray import failure mode
BUG: fix signed zero behavior in npy_divmod
MAINT: Add functions to parse shell-strings in the platform-native...
BUG: Fix regression in parsing of F90 and F77 environment variables
BUG: parse shell escaping in extra_compile_args and extra_link_args
BLD: Windows absolute path DLL loading

Revision 1.58 / (download) - annotate - [select for diffs], Fri Feb 1 09:24:24 2019 UTC (2 months, 3 weeks ago) by adam
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

py-numpy: updated to 1.16.1

* BUG: Check paths are unicode, bytes or path-like
* ENH: add mm->q floordiv
* ENH: port np.core.overrides to C for speed
* BUG: Ensure probabilities are not NaN in choice
* MAINT: add warning to numpy.distutils for LDFLAGS append behavior.
* ENH: add "max difference" messages to np.testing.assert_array_equal...
* BUG: Fix incorrect/missing reference cleanups found using valgrind
  that wraps subprocess
* DOC, TST: Clean up matplotlib imports
* BUG: Fix reference counting for subarrays containing objects
* BUG: Ensure failing memory allocations are reported
* BUG: Fix leak of void scalar buffer info
* MAINT: Change the order of checking for local file.
* BUG: loosen kwargs requirements in ediff1d
* DOC: clarify the extend of __array_function__ support in NumPy...
* BUG: Check that dtype or formats arguments are not None.
* BUG: fix f2py problem to build wrappers using PGI's Fortran
* BUG: double decref of dtype in failure codepath. Test and fix
* BUG, DOC: test, fix that f2py.compile accepts str and bytes,...
* BUG: resolve writeback in arr_insert failure paths
* ENH: Add mm->qm divmod
* BUG: Fix SystemError when pickling datetime64 array with pickle5
* BUG: Fix rounding of denormals in double and float to half casts.
* TEST: pin mingw version
* BUG: ndarrays pickled by 1.16 cannot be loaded by 1.15.4 and...
* BUG: do not Py_DECREF NULL pointer
* ENH: add _dtype_ctype to namespace for freeze analysis
* BUG: fail if old multiarray module detected
* BUG: Do not double-quote arguments passed on to the linker
* BUG: Do not insert extra double quote into preprocessor macros

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jan 15 21:36:57 2019 UTC (3 months, 1 week ago) by adam
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

py-numpy: updated to 1.16.0

NumPy 1.16.0 Release Notes

This NumPy release is the last one to support Python 2.7 and will be maintained
as a long term release with bug fixes until 2020. Support for Python 3.4 been
dropped, the supported Python versions are 2.7 and 3.5-3.7. The wheels on PyPI
are linked with OpenBLAS v0.3.4+, which should fix the known threading issues
found in previous OpenBLAS versions.

Downstream developers building this release should use Cython >= 0.29 and, if
using OpenBLAS, OpenBLAS > v0.3.4.

This release has seen a lot of refactoring and features many bug fixes, improved
code organization, and better cross platform compatibility. Not all of these
improvements will be visible to users, but they should help make maintenance
easier going forward.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Nov 5 09:23:26 2018 UTC (5 months, 2 weeks ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

py-numpy: updated to 1.15.4

NumPy 1.15.4:

This is a bugfix release for bugs and regressions reported following the 1.15.3
release.  The Python versions supported by this release are 2.7, 3.4-3.7. The
wheels are linked with OpenBLAS v0.3.0, which should fix some of the linalg
problems reported for NumPy 1.14.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Oct 31 13:13:20 2018 UTC (5 months, 3 weeks ago) by adam
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

py-numpy: updated to 1.15.3

NumPy 1.15.3:
This is a bugfix release for bugs and regressions reported following the 1.15.2
release.  The Python versions supported by this release are 2.7, 3.4-3.7. The
wheels are linked with OpenBLAS v0.3.0, which should fix some of the linalg
problems reported for NumPy 1.14.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Sep 24 09:01:20 2018 UTC (7 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

py-numpy: updated to 1.15.2

NumPy 1.15.2:

This is a bugfix release for bugs and regressions reported following the 1.15.1

* The matrix PendingDeprecationWarning is now suppressed in pytest 3.8.
* The new cached allocations machinery has been fixed to be thread safe.
* The boolean indexing of subclasses now works correctly.
* A small memory leak in PyArray_AdaptFlexibleDType has been fixed.

The Python versions supported by this release are 2.7, 3.4-3.7. The wheels are
linked with OpenBLAS v0.3.0, which should fix some of the linalg problems
reported for NumPy 1.14.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Aug 27 06:04:35 2018 UTC (7 months, 4 weeks ago) by adam
Branch: MAIN
Changes since 1.52: +3 -5 lines
Diff to previous 1.52 (colored)

py-numpy: updated to 1.15.1

NumPy 1.15.1:

This is a bugfix release for bugs and regressions reported following the 1.15.0

* The annoying but harmless RuntimeWarning that "numpy.dtype size changed" has
  been suppressed. The long standing suppression was lost in the transition to
* The update to Cython 0.28.3 exposed a problematic use of a gcc attribute used
  to prefer code size over speed in module initialization, possibly resulting in
  incorrect compiled code. This has been fixed in latest Cython but has been
  disabled here for safety.
* Support for big-endian and ARMv8 architectures has been improved.

The Python versions supported by this release are 2.7, 3.4-3.7. The wheels are
linked with OpenBLAS v0.3.0, which should fix some of the linalg problems
reported for NumPy 1.14.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Aug 10 08:59:08 2018 UTC (8 months, 2 weeks ago) by adam
Branch: MAIN
Changes since 1.51: +9 -4 lines
Diff to previous 1.51 (colored)

py-numpy: updated to 1.15.0

NumPy 1.15.0 is a release with an unusual number of cleanups, many deprecations
of old functions, and improvements to many existing functions. Please read the
detailed descriptions below to see if you are affected.

For testing, we have switched to pytest as a replacement for the no longer
maintained nose framework. The old nose based interface remains for downstream
projects who may still be using it.

The Python versions supported by this release are 2.7, 3.4-3.7. The wheels are
linked with OpenBLAS v0.3.0, which should fix some of the linalg problems
reported for NumPy 1.14.

- NumPy has switched to pytest for testing.
- A new numpy.printoptions context manager.
- Many improvements to the histogram functions.
- Support for unicode field names in python 2.7.
- Improved support for PyPy.
- Fixes and improvements to numpy.einsum.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Jun 18 06:47:03 2018 UTC (10 months, 1 week ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2018Q2-base, pkgsrc-2018Q2
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

py-numpy: updated to 1.14.5

NumPy 1.14.5:
This is a bugfix release for bugs reported following the 1.14.4 release. The
most significant fixes are:
* fixes for compilation errors on alpine and NetBSD

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jun 10 12:56:54 2018 UTC (10 months, 2 weeks ago) by wen
Branch: MAIN
Changes since 1.49: +2 -3 lines
Diff to previous 1.49 (colored)

Update to 1.14.4

Upstream changes:
NumPy 1.14.4 Release Notes

This is a bugfix release for bugs reported following the 1.14.3 release. The most significant fixes are:

    fixes for compiler instruction reordering that resulted in NaN's not being properly propagated in np.max and np.min,
    fixes for bus faults on SPARC and older ARM due to incorrect alignment checks.

Revision 1.49 / (download) - annotate - [select for diffs], Wed May 16 06:53:18 2018 UTC (11 months, 1 week ago) by minskim
Branch: MAIN
Changes since 1.48: +2 -1 lines
Diff to previous 1.48 (colored)

math/py-numpy: Bump PKGREVISION for the new patch

The patch to turn off debugging options has changed the binary package
of py-numpy.

Revision 1.48 / (download) - annotate - [select for diffs], Wed May 2 04:42:25 2018 UTC (11 months, 3 weeks ago) by adam
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

py-numpy: updated to 1.14.3

NumPy 1.14.3:
This is a bugfix release for a few bugs reported following the 1.14.2 release:
- np.lib.recfunctions.fromrecords accepts a list-of-lists, until 1.15
- In python2, float types use the new print style when printing to a file
- style arg in "legacy" print mode now works for 0d arrays

Revision 1.47 / (download) - annotate - [select for diffs], Tue Mar 13 11:34:08 2018 UTC (13 months, 1 week ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2018Q1-base, pkgsrc-2018Q1
Changes since 1.46: +4 -5 lines
Diff to previous 1.46 (colored)

py-numpy: updated to 1.14.2

This is a bugfix release for some bugs reported following the 1.14.1 release. The major
problems dealt with are as follows.

Residual bugs in the new array printing functionality.
Regression resulting in a relocation problem with shared library.
Improved PyPy compatibility.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Feb 22 10:50:47 2018 UTC (14 months ago) by adam
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

py-numpy: updated to 1.14.1

NumPy 1.14.1 Release Notes

This is a bugfix release for some problems reported following the 1.14.0 release. The major
problems fixed are the following.

Problems with the new array printing, particularly the printing of complex
values, Please report any additional problems that may turn up.
Problems with np.einsum due to the new optimized=True default. Some
fixes for optimization have been applied and optimize=False is now the
The sort order in np.unique when axis=<some-number> will now always
be lexicographic in the subarray elements. In previous NumPy versions there
was an optimization that could result in sorting the subarrays as unsigned
byte strings.
The change in 1.14.0 that multi-field indexing of structured arrays returns a
view instead of a copy has been reverted but remains on track for NumPy 1.15.
Affected users should read the 1.14.1 Numpy User Guide section
"basics/structured arrays/accessing multiple fields" for advice on how to
manage this transition.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jan 10 08:31:24 2018 UTC (15 months, 2 weeks ago) by adam
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

py-numpy: updated to 1.14.0

NumPy 1.14.0 Release Notes

Numpy 1.14.0 is the result of seven months of work and contains a large number
of bug fixes and new features, along with several changes with potential
compatibility issues. The major change that users will notice are the
stylistic changes in the way numpy arrays and scalars are printed, a change
that will affect doctests. See below for details on how to preserve the
old style printing when needed.

A major decision affecting future development concerns the schedule for
dropping Python 2.7 support in the runup to 2020. The decision has been made to
support 2.7 for all releases made in 2018, with the last release being
designated a long term release with support for bug fixes extending through
2019. In 2019 support for 2.7 will be dropped in all new releases. More details
can be found in the relevant NEP_.

This release supports Python 2.7 and 3.4 - 3.6.

Revision / (download) - annotate - [select for diffs], Mon Oct 9 12:23:07 2017 UTC (18 months, 2 weeks ago) by spz
Branch: pkgsrc-2017Q3
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored) next main 1.44 (colored)

Pullup ticket #5564 - requested by sevan
math/py-numpy: security update

Revisions pulled up:
- math/py-numpy/Makefile                                        1.44
- math/py-numpy/distinfo                                        1.25
- math/py-numpy/patches/  1.13

   Module Name:    pkgsrc
   Committed By:   adam
   Date:           Thu Oct  5 08:21:27 UTC 2017

   Modified Files:
           pkgsrc/math/py-numpy: Makefile distinfo

   Log Message:
   py-numpy: update to 1.13.3

   NumPy 1.13.3:
   This is a bugfix release for some problems found since 1.13.1. The most
   important fixes are for CVE-2017-12852 and temporary elision. Users of
   versions of 1.13 should upgrade.

   To generate a diff of this commit:
   cvs rdiff -u -r1.43 -r1.44 pkgsrc/math/py-numpy/Makefile
   cvs rdiff -u -r1.24 -r1.25 pkgsrc/math/py-numpy/distinfo
   cvs rdiff -u -r1.12 -r1.13 \

Revision 1.44 / (download) - annotate - [select for diffs], Thu Oct 5 08:21:27 2017 UTC (18 months, 2 weeks ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2017Q4-base, pkgsrc-2017Q4
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

py-numpy: update to 1.13.3

NumPy 1.13.3:
This is a bugfix release for some problems found since 1.13.1. The most
important fixes are for CVE-2017-12852 and temporary elision. Users of earlier
versions of 1.13 should upgrade.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Jul 7 04:21:10 2017 UTC (21 months, 2 weeks ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2017Q3-base, pkgsrc-
Branch point for: pkgsrc-2017Q3
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Bug fixes.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jun 15 07:02:53 2017 UTC (22 months, 1 week ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2017Q2-base, pkgsrc-2017Q2
Changes since 1.41: +2 -3 lines
Diff to previous 1.41 (colored)

NumPy 1.13.0

* Operations like a + b + c will reuse temporaries on some platforms,
  resulting in less memory use and faster execution.
* Inplace operations check if inputs overlap outputs and create temporaries
  to avoid problems.
* New __array_ufunc__ attribute provides improved ability for classes to
  override default ufunc behavior.
* New np.block function for creating blocked arrays.

New functions
* New np.positive ufunc.
* New np.divmod ufunc provides more efficient divmod.
* New np.isnat ufunc tests for NaT special values.
* New np.heaviside ufunc computes the Heaviside function.
* New np.isin function, improves on in1d.
* New np.block function for creating blocked arrays.
* New PyArray_MapIterArrayCopyIfOverlap added to NumPy C-API.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Mar 24 19:22:27 2017 UTC (2 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2017Q1-base, pkgsrc-2017Q1
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Check the version number part of the matched string and not the whole
string, otherwise the result is somewhat random. Bump revision again.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Mar 24 15:12:30 2017 UTC (2 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored)

Restore basic g95 support. Bump revision.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Mar 20 13:50:01 2017 UTC (2 years, 1 month ago) by wiz
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Updated py-numpy to 1.12.1.

NumPy 1.12.1 supports Python 2.7 and 3.4 - 3.6 and fixes bugs and regressions
found in NumPy 1.12.0. In particular, the regression in f2py constant parsing
is fixed.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Jan 22 14:43:24 2017 UTC (2 years, 3 months ago) by wiz
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Updated py-numpy to 1.12.0.

FAILED (KNOWNFAIL=8, SKIP=9, errors=1, failures=1)

NumPy 1.12.0 Release Notes

This release supports Python 2.7 and 3.4 - 3.6.

The NumPy 1.12.0 release contains a large number of fixes and improvements, but
few that stand out above all others. That makes picking out the highlights
somewhat arbitrary but the following may be of particular interest or indicate
areas likely to have future consequences.

* Order of operations in ``np.einsum`` can now be optimized for large speed improvements.
* New ``signature`` argument to ``np.vectorize`` for vectorizing with core dimensions.
* The ``keepdims`` argument was added to many functions.
* New context manager for testing warnings
* Support for BLIS in numpy.distutils
* Much improved support for PyPy (not yet finished)

Dropped Support

* Support for Python 2.6, 3.2, and 3.3 has been dropped.

Added Support

* Support for PyPy 2.7 v5.6.0 has been added. While not complete (nditer
  ``updateifcopy`` is not supported yet), this is a milestone for PyPy's
  C-API compatibility layer.

Build System Changes

* Library order is preserved, instead of being reordered to match that of
  the directories.


Assignment of ndarray object's ``data`` attribute
Assigning the 'data' attribute is an inherently unsafe operation as pointed
out in gh-7083. Such a capability will be removed in the future.

Unsafe int casting of the num attribute in ``linspace``
``np.linspace`` now raises DeprecationWarning when num cannot be safely
interpreted as an integer.

Insufficient bit width parameter to ``binary_repr``
If a 'width' parameter is passed into ``binary_repr`` that is insufficient to
represent the number in base 2 (positive) or 2's complement (negative) form,
the function used to silently ignore the parameter and return a representation
using the minimal number of bits needed for the form in question. Such behavior
is now considered unsafe from a user perspective and will raise an error in the

Future Changes

* In 1.13 NAT will always compare False except for ``NAT != NAT``,
  which will be True.  In short, NAT will behave like NaN
* In 1.13 np.average will preserve subclasses, to match the behavior of most
  other numpy functions such as np.mean. In particular, this means calls which
  returned a scalar may return a 0-d subclass object instead.

Multiple-field manipulation of structured arrays
In 1.13 the behavior of structured arrays involving multiple fields will change
in two ways:

First, indexing a structured array with multiple fields (eg,
``arr[['f1', 'f3']]``) will return a view into the original array in 1.13,
instead of a copy. Note the returned view will have extra padding bytes
corresponding to intervening fields in the original array, unlike the copy in
1.12, which will affect code such as ``arr[['f1', 'f3']].view(newdtype)``.

Second, for numpy versions 1.6 to 1.12 assignment between structured arrays
occurs "by field name": Fields in the destination array are set to the
identically-named field in the source array or to 0 if the source does not have
a field::

    >>> a = np.array([(1,2),(3,4)], dtype=[('x', 'i4'), ('y', 'i4')])
    >>> b = np.ones(2, dtype=[('z', 'i4'), ('y', 'i4'), ('x', 'i4')])
    >>> b[:] = a
    >>> b
    array([(0, 2, 1), (0, 4, 3)],
          dtype=[('z', '<i4'), ('y', '<i4'), ('x', '<i4')])

In 1.13 assignment will instead occur "by position": The Nth field of the
destination will be set to the Nth field of the source regardless of field
name. The old behavior can be obtained by using indexing to reorder the fields
assignment, e.g., ``b[['x', 'y']] = a[['y', 'x']]``.

Compatibility notes

DeprecationWarning to error

* Indexing with floats raises ``IndexError``,
  e.g., a[0, 0.0].
* Indexing with non-integer array_like raises ``IndexError``,
  e.g., ``a['1', '2']``
* Indexing with multiple ellipsis raises ``IndexError``,
  e.g., ``a[..., ...]``.
* Non-integers used as index values raise ``TypeError``,
  e.g., in ``reshape``, ``take``, and specifying reduce axis.

FutureWarning to changed behavior

* ``np.full`` now returns an array of the fill-value's dtype if no dtype is
  given, instead of defaulting to float.
* np.average will emit a warning if the argument is a subclass of ndarray,
  as the subclass will be preserved starting in 1.13. (see Future Changes)

``power`` and ``**`` raise errors for integer to negative integer powers
The previous behavior depended on whether numpy scalar integers or numpy
integer arrays were involved.

For arrays

* Zero to negative integer powers returned least integral value.
* Both 1, -1 to negative integer powers returned correct values.
* The remaining integers returned zero when raised to negative integer powers.

For scalars

* Zero to negative integer powers returned least integral value.
* Both 1, -1 to negative integer powers returned correct values.
* The remaining integers sometimes returned zero, sometimes the
  correct float depending on the integer type combination.

All of these cases now raise a ``ValueError`` except for those integer
combinations whose common type is float, for instance uint64 and int8. It was
felt that a simple rule was the best way to go rather than have special
exceptions for the integer units. If you need negative powers, use an inexact

Relaxed stride checking is the default
This will have some impact on code that assumed that ``F_CONTIGUOUS`` and
``C_CONTIGUOUS`` were mutually exclusive and could be set to determine the
default order for arrays that are now both.

The ``np.percentile`` 'midpoint' interpolation method fixed for exact indices
The 'midpoint' interpolator now gives the same result as 'lower' and 'higher' when
the two coincide. Previous behavior of 'lower' + 0.5 is fixed.

``keepdims`` kwarg is passed through to user-class methods
numpy functions that take a ``keepdims`` kwarg now pass the value
through to the corresponding methods on ndarray sub-classes.  Previously the
``keepdims`` keyword would be silently dropped.  These functions now have
the following behavior:

1. If user does not provide ``keepdims``, no keyword is passed to the underlying
2. Any user-provided value of ``keepdims`` is passed through as a keyword
   argument to the method.

This will raise in the case where the method does not support a
``keepdims`` kwarg and the user explicitly passes in ``keepdims``.

The following functions are changed: ``sum``, ``product``,
``sometrue``, ``alltrue``, ``any``, ``all``, ``amax``, ``amin``,
``prod``, ``mean``, ``std``, ``var``, ``nanmin``, ``nanmax``,
``nansum``, ``nanprod``, ``nanmean``, ``nanmedian``, ``nanvar``,

``bitwise_and`` identity changed
The previous identity was 1, it is now -1. See entry in `Improvements`_ for
more explanation.

ma.median warns and returns nan when unmasked invalid values are encountered
Similar to unmasked median the masked median `ma.median` now emits a Runtime
warning and returns `NaN` in slices where an unmasked `NaN` is present.

Greater consistancy in ``assert_almost_equal``
The precision check for scalars has been changed to match that for arrays. It
is now::

    abs(actual - desired) < 1.5 * 10**(-decimal)

Note that this is looser than previously documented, but agrees with the
previous implementation used in ``assert_array_almost_equal``. Due to the
change in implementation some very delicate tests may fail that did not
fail before.

``NoseTester`` behaviour of warnings during testing
When ``raise_warnings="develop"`` is given, all uncaught warnings will now
be considered a test failure. Previously only selected ones were raised.
Warnings which are not caught or raised (mostly when in release mode)
will be shown once during the test cycle similar to the default python

``assert_warns`` and ``deprecated`` decorator more specific
The ``assert_warns`` function and context manager are now more specific
to the given warning category. This increased specificity leads to them
being handled according to the outer warning settings. This means that
no warning may be raised in cases where a wrong category warning is given
and ignored outside the context. Alternatively the increased specificity
may mean that warnings that were incorrectly ignored will now be shown
or raised. See also the new ``suppress_warnings`` context manager.
The same is true for the ``deprecated`` decorator.

No changes.

New Features

Writeable keyword argument for ``as_strided``
``np.lib.stride_tricks.as_strided`` now has a ``writeable``
keyword argument. It can be set to False when no write operation
to the returned array is expected to avoid accidental
unpredictable writes.

``axes`` keyword argument for ``rot90``
The ``axes`` keyword argument in ``rot90`` determines the plane in which the
array is rotated. It defaults to ``axes=(0,1)`` as in the originial function.

Generalized ``flip``
``flipud`` and ``fliplr`` reverse the elements of an array along axis=0 and
axis=1 respectively. The newly added ``flip`` function reverses the elements of
an array along any given axis.

* ``np.count_nonzero`` now has an ``axis`` parameter, allowing
  non-zero counts to be generated on more than just a flattened
  array object.

BLIS support in ``numpy.distutils``
Building against the BLAS implementation provided by the BLIS library is now
supported.  See the ``[blis]`` section in ``site.cfg.example`` (in the root of
the numpy repo or source distribution).

Hook in ``numpy/`` to run distribution-specific checks
Binary distributions of numpy may need to run specific hardware checks or load
specific libraries during numpy initialization.  For example, if we are
distributing numpy with a BLAS library that requires SSE2 instructions, we
would like to check the machine on which numpy is running does have SSE2 in
order to give an informative error.

Add a hook in ``numpy/`` to import a ``numpy/``
file that will remain empty (bar a docstring) in the standard numpy source,
but that can be overwritten by people making binary distributions of numpy.

New nanfunctions ``nancumsum`` and ``nancumprod`` added
Nan-functions ``nancumsum`` and ``nancumprod`` have been added to
compute ``cumsum`` and ``cumprod`` by ignoring nans.

``np.interp`` can now interpolate complex values
``np.lib.interp(x, xp, fp)`` now allows the interpolated array ``fp``
to be complex and will interpolate at ``complex128`` precision.

New polynomial evaluation function ``polyvalfromroots`` added
The new function ``polyvalfromroots`` evaluates a polynomial at given points
from the roots of the polynomial. This is useful for higher order polynomials,
where expansion into polynomial coefficients is inaccurate at machine

New array creation function ``geomspace`` added
The new function ``geomspace`` generates a geometric sequence.  It is similar
to ``logspace``, but with start and stop specified directly:
``geomspace(start, stop)`` behaves the same as
``logspace(log10(start), log10(stop))``.

New context manager for testing warnings
A new context manager ``suppress_warnings`` has been added to the testing
utils. This context manager is designed to help reliably test warnings.
Specifically to reliably filter/ignore warnings. Ignoring warnings
by using an "ignore" filter in Python versions before 3.4.x can quickly
result in these (or similar) warnings not being tested reliably.

The context manager allows to filter (as well as record) warnings similar
to the ``catch_warnings`` context, but allows for easier specificity.
Also printing warnings that have not been filtered or nesting the
context manager will work as expected. Additionally, it is possible
to use the context manager as a decorator which can be useful when
multiple tests give need to hide the same warning.

New masked array functions ``ma.convolve`` and ``ma.correlate`` added
These functions wrapped the non-masked versions, but propagate through masked
values. There are two different propagation modes. The default causes masked
values to contaminate the result with masks, but the other mode only outputs
masks if there is no alternative.

New ``float_power`` ufunc
The new ``float_power`` ufunc is like the ``power`` function except all
computation is done in a minimum precision of float64. There was a long
discussion on the numpy mailing list of how to treat integers to negative
integer powers and a popular proposal was that the ``__pow__`` operator should
always return results of at least float64 precision. The ``float_power``
function implements that option. Note that it does not support object arrays.

``np.loadtxt`` now supports a single integer as ``usecol`` argument
Instead of using ``usecol=(n,)`` to read the nth column of a file
it is now allowed to use ``usecol=n``. Also the error message is
more user friendly when a non-integer is passed as a column index.

Improved automated bin estimators for ``histogram``
Added 'doane' and 'sqrt' estimators to ``histogram`` via the ``bins``
argument. Added support for range-restricted histograms with automated
bin estimation.

``np.roll`` can now roll multiple axes at the same time
The ``shift`` and ``axis`` arguments to ``roll`` are now broadcast against each
other, and each specified axis is shifted accordingly.

The ``__complex__`` method has been implemented for the ndarrays
Calling ``complex()`` on a size 1 array will now cast to a python

``pathlib.Path`` objects now supported
The standard ``np.load``, ````, ``np.loadtxt``, ``np.savez``, and similar
functions can now take ``pathlib.Path`` objects as an argument instead of a
filename or open file object.

New ``bits`` attribute for ``np.finfo``
This makes ``np.finfo`` consistent with ``np.iinfo`` which already has that

New ``signature`` argument to ``np.vectorize``
This argument allows for vectorizing user defined functions with core
dimensions, in the style of NumPy's
:ref:`generalized universal functions<c-api.generalized-ufuncs>`. This allows
for vectorizing a much broader class of functions. For example, an arbitrary
distance metric that combines two vectors to produce a scalar could be
vectorized with ``signature='(n),(n)->()'``. See ``np.vectorize`` for full

Emit py3kwarnings for division of integer arrays
To help people migrate their code bases from Python 2 to Python 3, the
python interpreter has a handy option -3, which issues warnings at runtime.
One of its warnings is for integer division::

    $ python -3 -c "2/3"

    -c:1: DeprecationWarning: classic int division

In Python 3, the new integer division semantics also apply to numpy arrays.
With this version, numpy will emit a similar warning::

    $ python -3 -c "import numpy as np; np.array(2)/np.array(3)"

    -c:1: DeprecationWarning: numpy: classic int division

numpy.sctypes now includes bytes on Python3 too
Previously, it included str (bytes) and unicode on Python2, but only str
(unicode) on Python3.


``bitwise_and`` identity changed
The previous identity was 1 with the result that all bits except the LSB were
masked out when the reduce method was used.  The new identity is -1, which
should work properly on twos complement machines as all bits will be set to

Generalized Ufuncs will now unlock the GIL
Generalized Ufuncs, including most of the linalg module, will now unlock
the Python global interpreter lock.

Caches in `np.fft` are now bounded in total size and item count
The caches in `np.fft` that speed up successive FFTs of the same length can no
longer grow without bounds. They have been replaced with LRU (least recently
used) caches that automatically evict no longer needed items if either the
memory size or item count limit has been reached.

Improved handling of zero-width string/unicode dtypes
Fixed several interfaces that explicitly disallowed arrays with zero-width
string dtypes (i.e. ``dtype('S0')`` or ``dtype('U0')``, and fixed several
bugs where such dtypes were not handled properly.  In particular, changed
``ndarray.__new__`` to not implicitly convert ``dtype('S0')`` to
``dtype('S1')`` (and likewise for unicode) when creating new arrays.

Integer ufuncs vectorized with AVX2
If the cpu supports it at runtime the basic integer ufuncs now use AVX2
instructions. This feature is currently only available when compiled with GCC.

Order of operations optimization in ``np.einsum``
``np.einsum`` now supports the ``optimize`` argument which will optimize the
order of contraction. For example, ``np.einsum`` would complete the chain dot
example ``np.einsum(j,jk,kl->il a, b, c)`` in a single pass which would
scale like ``N^4``; however, when ``optimize=True`` ``np.einsum`` will create
an intermediate array to reduce this scaling to ``N^3`` or effectively
``, b).dot(c)``. Usage of intermediate tensors to reduce scaling has
been applied to the general einsum summation notation. See ``np.einsum_path``
for more details.

quicksort has been changed to an introsort
The quicksort kind of ``np.sort`` and ``np.argsort`` is now an introsort which
is regular quicksort but changing to a heapsort when not enough progress is
made. This retains the good quicksort performance while changing the worst case
runtime from ``O(N^2)`` to ``O(N*log(N))``.

``ediff1d`` improved performance and subclass handling
The ediff1d function uses an array instead on a flat iterator for the
subtraction.  When to_begin or to_end is not None, the subtraction is performed
in place to eliminate a copy operation.  A side effect is that certain
subclasses are handled better, namely astropy.Quantity, since the complete
array is created, wrapped, and then begin and end values are set, instead of
using concatenate.

Improved precision of ``ndarray.mean`` for float16 arrays
The computation of the mean of float16 arrays is now carried out in float32 for
improved precision. This should be useful in packages such as Theano
where the precision of float16 is adequate and its smaller footprint is


All array-like methods are now called with keyword arguments in
Internally, many array-like methods in were being called with
positional arguments instead of keyword arguments as their external signatures
were doing. This caused a complication in the downstream 'pandas' library
that encountered an issue with 'numpy' compatibility. Now, all array-like
methods in this module are called with keyword arguments instead.

Operations on np.memmap objects return numpy arrays in most cases
Previously operations on a memmap object would misleadingly return a memmap
instance even if the result was actually not memmapped.  For example,
``arr + 1`` or ``arr + arr`` would return memmap instances, although no memory
from the output array is memmaped. Version 1.12 returns ordinary numpy arrays
from these operations.

Also, reduction of a memmap (e.g.  ``.sum(axis=None``) now returns a numpy
scalar instead of a 0d memmap.

stacklevel of warnings increased
The stacklevel for python based warnings was increased so that most warnings
will report the offending line of the user code instead of the line the
warning itself is given. Passing of stacklevel is now tested to ensure that
new warnings will receive the ``stacklevel`` argument.

This causes warnings with the "default" or "module" filter to be shown once
for every offending user code line or user module instead of only once. On
python versions before 3.4, this can cause warnings to appear that were falsely
ignored before, which may be surprising especially in test suits.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jan 1 15:31:47 2017 UTC (2 years, 3 months ago) by wiz
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Updated py-numpy to 1.11.3.

NumPy 1.11.3 Release Notes

Numpy 1.11.3 fixes a bug that leads to file corruption when very large files
opened in append mode are used in ``ndarray.tofile``. It supports Python
versions 2.6 - 2.7 and 3.2 - 3.5. Wheels for Linux, Windows, and OS X can be
found on PyPI.

Contributors to maintenance/1.11.3

A total of 2 people contributed to this release.  People with a "+" by their
names contributed a patch for the first time.

- Charles Harris
- Pavel Potocek +

Pull Requests Merged

- `#8341 <>`__: BUG: Fix ndarray.tofile large file corruption in append mode.
- `#8346 <>`__: TST: Fix tests in PR #8341 for NumPy 1.11.x

Revision 1.36 / (download) - annotate - [select for diffs], Mon Dec 12 14:36:22 2016 UTC (2 years, 4 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2016Q4-base, pkgsrc-2016Q4
Changes since 1.35: +2 -4 lines
Diff to previous 1.35 (colored)

MAKE_ENV is in OPSYSVARS -- simplify previous.

Thanks, jperkin!

Revision 1.35 / (download) - annotate - [select for diffs], Mon Dec 12 14:23:47 2016 UTC (2 years, 4 months ago) by wiz
Branch: MAIN
Changes since 1.34: +8 -7 lines
Diff to previous 1.34 (colored)

Wrap DragonFly specific workaround in .if ${OPSYS} == "DragonFly"

Revision 1.34 / (download) - annotate - [select for diffs], Sun Dec 4 22:51:55 2016 UTC (2 years, 4 months ago) by marino
Branch: MAIN
Changes since 1.33: +7 -1 lines
Diff to previous 1.33 (colored)

math/py-numpy: Restore build on DragonFly

Linking lapack with the gold linker fails with this error:
fatal error: --sysroot=: must take a non-empty argument

Similar to recent fixes to math/blas and math/lapack

Revision 1.33 / (download) - annotate - [select for diffs], Mon Oct 31 16:26:57 2016 UTC (2 years, 5 months ago) by wiz
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Updated py-numpy to 1.11.2.

NumPy 1.11.2 Release Notes

Numpy 1.11.2 supports Python 2.6 - 2.7 and 3.2 - 3.5. It fixes bugs and
regressions found in Numpy 1.11.1 and includes several build related
improvements. Wheels for Linux, Windows, and OS X can be found on PyPI.

Pull Requests Merged

Fixes overridden by later merges and release notes updates are omitted.

- #7736 BUG: Many functions silently drop 'keepdims' kwarg.
- #7738 ENH: Add extra kwargs and update doc of many MA methods.
- #7778 DOC: Update Numpy 1.11.1 release notes.
- #7793 BUG: MaskedArray.count treats negative axes incorrectly.
- #7816 BUG: Fix array too big error for wide dtypes.
- #7821 BUG: Make sure npy_mul_with_overflow_<type> detects overflow.
- #7824 MAINT: Allocate fewer bytes for empty arrays.
- #7847 MAINT,DOC: Fix some imp module uses and update f2py.compile docstring.
- #7849 MAINT: Fix remaining uses of deprecated Python imp module.
- #7851 BLD: Fix ATLAS version detection.
- #7896 BUG: Construct ma.array from np.array which contains padding.
- #7904 BUG: Fix float16 type not being called due to wrong ordering.
- #7917 BUG: Production install of numpy should not require nose.
- #7919 BLD: Fixed MKL detection for recent versions of this library.
- #7920 BUG: Fix for issue #7835 (ma.median of 1d).
- #7932 BUG: Monkey-patch _msvccompile.gen_lib_option like other compilers.
- #7939 BUG: Check for HAVE_LDOUBLE_DOUBLE_DOUBLE_LE in npy_math_complex.
- #7953 BUG: Guard against buggy comparisons in generic quicksort.
- #7954 BUG: Use keyword arguments to initialize Extension base class.
- #7955 BUG: Make sure numpy globals keep identity after reload.
- #7972 BUG: MSVCCompiler grows 'lib' & 'include' env strings exponentially.
- #8005 BLD: Remove __NUMPY_SETUP__ from builtins at end of
- #8010 MAINT: Remove leftover imp module imports.
- #8020 BUG: Fix return of if keepdims is True and axis is None.
- #8024 BUG: Fix
- #8031 BUG: Fix with only one non-masked value.
- #8044 BUG: Fix bug in NpyIter buffering with discontinuous arrays.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Aug 28 15:48:33 2016 UTC (2 years, 7 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2016Q3-base, pkgsrc-2016Q3
Changes since 1.31: +1 -2 lines
Diff to previous 1.31 (colored)

Remove unnecessary PLIST_SUBST and FILES_SUBST that are now provided
by the infrastructure.

Mark a couple more packages as not ready for python-3.x.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Aug 23 22:45:05 2016 UTC (2 years, 8 months ago) by wiz
Branch: MAIN
Changes since 1.30: +4 -2 lines
Diff to previous 1.30 (colored)

py-nose test dependency.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Aug 2 10:14:46 2016 UTC (2 years, 8 months ago) by jperkin
Branch: MAIN
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)

Fix build, this package now needs py-cython and

Revision 1.29 / (download) - annotate - [select for diffs], Sun Jul 24 15:25:22 2016 UTC (2 years, 9 months ago) by kamil
Branch: MAIN
Changes since 1.28: +8 -24 lines
Diff to previous 1.28 (colored)

Upgrade py-numpy from 1.9.2 to 1.11.1

pkgsrc changes:
 - swich to the GITHUB framework
 - add functional test target
 - update local patches

upstream changes:

NumPy 1.11.1 Release Notes

Numpy 1.11.1 supports Python 2.6 - 2.7 and 3.2 - 3.5. It fixes bugs and regressions found in Numpy 1.11.0 and includes several build related improvements. Wheels for Linux, Windows, and OSX can be found on pypi.
Fixes Merged

    #7506 BUG: Make sure numpy imports on python 2.6 when nose is unavailable.
    #7530 BUG: Floating exception with invalid axis in np.lexsort.
    #7535 BUG: Extend glibc complex trig functions blacklist to glibc < 2.18.
    #7551 BUG: Allow graceful recovery for no compiler.
    #7558 BUG: Constant padding expected wrong type in constant_values.
    #7578 BUG: Fix OverflowError in Python 3.x. in swig interface.
    #7590 BLD: Fix configparser.InterpolationSyntaxError.
    #7597 BUG: Make work on scalars.
    #7608 BUG: linalg.norm(): Don't convert object arrays to float.
    #7638 BLD: Correct C compiler customization in
    #7654 BUG: ma.median of 1d array should return a scalar.
    #7656 BLD: Remove hardcoded Intel compiler flag -xSSE4.2.
    #7660 BUG: Temporary fix for str(mvoid) for object field types.
    #7665 BUG: Fix incorrect printing of 1D masked arrays.
    #7670 BUG: Correct initial index estimate in histogram.
    #7671 BUG: Boolean assignment no GIL release when transfer needs API.
    #7676 BUG: Fix handling of right edge of final histogram bin.
    #7680 BUG: Fix np.clip bug NaN handling for Visual Studio 2015.
    #7724 BUG: Fix segfaults in np.random.shuffle.
    #7731 MAINT: Change mkl_info.dir_env_var from MKL to MKLROOT.
    #7737 BUG: Fix issue on OS X with Python 3.x, npymath.ini not installed.

NumPy 1.11.0 Release Notes

This release supports Python 2.6 - 2.7 and 3.2 - 3.5 and contains a number of enhancements and improvements. Note also the build system changes listed below as they may have subtle effects.

No Windows (TM) binaries are provided for this release due to a broken toolchain. One of the providers of Python packages for Windows (TM) is your best bet.

Details of these improvements can be found below.

    The datetime64 type is now timezone naive.
    A dtype parameter has been added to randint.
    Improved detection of two arrays possibly sharing memory.
    Automatic bin size estimation for np.histogram.
    Speed optimization of A @ A.T and dot(A, A.T).
    New function np.moveaxis for reordering array axes.

Build System Changes

    Numpy now uses setuptools for its builds instead of plain distutils. This fixes usage of install_requires='numpy' in the files of projects that depend on Numpy (see gh-6551). It potentially affects the way that build/install methods for Numpy itself behave though. Please report any unexpected behavior on the Numpy issue tracker.
    Bento build support and related files have been removed.
    Single file build support and related files have been removed.

Future Changes

The following changes are scheduled for Numpy 1.12.0.

    Support for Python 2.6, 3.2, and 3.3 will be dropped.
    Relaxed stride checking will become the default. See the 1.8.0 release notes for a more extended discussion of what this change implies.
    The behavior of the datetime64 "not a time" (NaT) value will be changed to match that of floating point "not a number" (NaN) values: all comparisons involving NaT will return False, except for NaT != NaT which will return True.
    Indexing with floats will raise IndexError, e.g., a[0, 0.0].
    Indexing with non-integer array_like will raise IndexError, e.g., a['1', '2']
    Indexing with multiple ellipsis will raise IndexError, e.g., a[..., ...].
    Non-integers used as index values will raise TypeError, e.g., in reshape, take, and specifying reduce axis.

In a future release the following changes will be made.

    The rand function exposed in numpy.testing will be removed. That function is left over from early Numpy and was implemented using the Python random module. The random number generators from numpy.random should be used instead.
    The ndarray.view method will only allow c_contiguous arrays to be viewed using a dtype of different size causing the last dimension to change. That differs from the current behavior where arrays that are f_contiguous but not c_contiguous can be viewed as a dtype type of different size causing the first dimension to change.
    Slicing a MaskedArray will return views of both data and mask. Currently the mask is copy-on-write and changes to the mask in the slice do not propagate to the original mask. See the FutureWarnings section below for details.

Compatibility notes
datetime64 changes

In prior versions of NumPy the experimental datetime64 type always stored times in UTC. By default, creating a datetime64 object from a string or printing it would convert from or to local time:

# old behavior
>>>> np.datetime64('2000-01-01T00:00:00')
numpy.datetime64('2000-01-01T00:00:00-0800')  # note the timezone offset -08:00

A consensus of datetime64 users agreed that this behavior is undesirable and at odds with how datetime64 is usually used (e.g., by pandas). For most use cases, a timezone naive datetime type is preferred, similar to the datetime.datetime type in the Python standard library. Accordingly, datetime64 no longer assumes that input is in local time, nor does it print local times:

>>>> np.datetime64('2000-01-01T00:00:00')

For backwards compatibility, datetime64 still parses timezone offsets, which it handles by converting to UTC. However, the resulting datetime is timezone naive:

>>> np.datetime64('2000-01-01T00:00:00-08')
DeprecationWarning: parsing timezone aware datetimes is deprecated;
this will raise an error in the future

As a corollary to this change, we no longer prohibit casting between datetimes with date units and datetimes with time units. With timezone naive datetimes, the rule for casting from dates to times is no longer ambiguous.
linalg.norm return type changes

The return type of the linalg.norm function is now floating point without exception. Some of the norm types previously returned integers.
polynomial fit changes

The various fit functions in the numpy polynomial package no longer accept non-integers for degree specification. now raises TypeError instead of ValueError

This behaviour mimics that of other functions such as np.inner. If the two arguments cannot be cast to a common type, it could have raised a TypeError or ValueError depending on their order. Now, will now always raise a TypeError.
FutureWarning to changed behavior

    In np.lib.split an empty array in the result always had dimension (0,) no matter the dimensions of the array being split. This has been changed so that the dimensions will be preserved. A FutureWarning for this change has been in place since Numpy 1.9 but, due to a bug, sometimes no warning was raised and the dimensions were already preserved.

% and // operators

These operators are implemented with the remainder and floor_divide functions respectively. Those functions are now based around fmod and are computed together so as to be compatible with each other and with the Python versions for float types. The results should be marginally more accurate or outright bug fixes compared to the previous results, but they may differ significantly in cases where roundoff makes a difference in the integer returned by floor_divide. Some corner cases also change, for instance, NaN is always returned for both functions when the divisor is zero, divmod(1.0, inf) returns (0.0, 1.0) except on MSVC 2008, and divmod(-1.0, inf) returns (-1.0, inf).

Removed the check_return and inner_loop_selector members of the PyUFuncObject struct (replacing them with reserved slots to preserve struct layout). These were never used for anything, so it's unlikely that any third-party code is using them either, but we mention it here for completeness.
object dtype detection for old-style classes

In python 2, objects which are instances of old-style user-defined classes no longer automatically count as 'object' type in the dtype-detection handler. Instead, as in python 3, they may potentially count as sequences, but only if they define both a __len__ and a __getitem__ method. This fixes a segfault and inconsistency between python 2 and 3.
New Features

    np.histogram now provides plugin estimators for automatically estimating the optimal number of bins. Passing one of ['auto', 'fd', 'scott', 'rice', 'sturges'] as the argument to 'bins' results in the corresponding estimator being used.

    A benchmark suite using Airspeed Velocity has been added, converting the previous vbench-based one. You can run the suite locally via python --bench. For more details, see benchmarks/README.rst.

    A new function np.shares_memory that can check exactly whether two arrays have memory overlap is added. np.may_share_memory also now has an option to spend more effort to reduce false positives.

    SkipTest and KnownFailureException exception classes are exposed in the numpy.testing namespace. Raise them in a test function to mark the test to be skipped or mark it as a known failure, respectively.

    f2py.compile has a new extension keyword parameter that allows the fortran extension to be specified for generated temp files. For instance, the files can be specifies to be *.f90. The verbose argument is also activated, it was previously ignored.

    A dtype parameter has been added to np.random.randint Random ndarrays of the following types can now be generated:
        np.int8, np.uint8,
        np.int16, np.uint16,
        np.int32, np.uint32,
        np.int64, np.uint64,
        np.int_ ``, ``np.intp

    The specification is by precision rather than by C type. Hence, on some platforms np.int64 may be a long instead of long long even if the specified dtype is long long because the two may have the same precision. The resulting type depends on which C type numpy uses for the given precision. The byteorder specification is also ignored, the generated arrays are always in native byte order.

    A new np.moveaxis function allows for moving one or more array axes to a new position by explicitly providing source and destination axes. This function should be easier to use than the current rollaxis function as well as providing more functionality.

    The deg parameter of the various numpy.polynomial fits has been extended to accept a list of the degrees of the terms to be included in the fit, the coefficients of all other terms being constrained to zero. The change is backward compatible, passing a scalar deg will behave as before.

    A divmod function for float types modeled after the Python version has been added to the npy_math library.

np.gradient now supports an axis argument

The axis parameter was added to np.gradient for consistency. It allows to specify over which axes the gradient is calculated.
np.lexsort now supports arrays with object data-type

The function now internally calls the generic npy_amergesort when the type does not implement a merge-sort kind of argsort method. now supports an order argument

When constructing a new MaskedArray instance, it can be configured with an order argument analogous to the one when calling np.ndarray. The addition of this argument allows for the proper processing of an order argument in several MaskedArray-related utility functions such as and
Memory and speed improvements for masked arrays

Creating a masked array with mask=True (resp. mask=False) now uses np.ones (resp. np.zeros) to create the mask, which is faster and avoid a big memory peak. Another optimization was done to avoid a memory peak and useless computations when printing a masked array.
ndarray.tofile now uses fallocate on linux

The function now uses the fallocate system call to reserve sufficient disk space on file systems that support it.
Optimizations for operations of the form A.T @ A and A @ A.T

Previously, gemm BLAS operations were used for all matrix products. Now, if the matrix product is between a matrix and its transpose, it will use syrk BLAS operations for a performance boost. This optimization has been extended to @,, numpy.inner, and numpy.matmul.

Note: Requires the transposed and non-transposed matrices to share data.
np.testing.assert_warns can now be used as a context manager

This matches the behavior of assert_raises.
Speed improvement for np.random.shuffle

np.random.shuffle is now much faster for 1d ndarrays.
Pyrex support was removed from numpy.distutils

The method build_src.generate_a_pyrex_source will remain available; it has been monkeypatched by users to support Cython instead of Pyrex. It's recommended to switch to a better supported method of build Cython extensions though.
np.broadcast can now be called with a single argument

The resulting object in that case will simply mimic iteration over a single array. This change obsoletes distinctions like

    if len(x) == 1:
        shape = x[0].shape
        shape = np.broadcast(*x).shape

Instead, np.broadcast can be used in all cases.
np.trace now respects array subclasses

This behaviour mimics that of other functions such as np.diagonal and ensures, e.g., that for masked arrays np.trace(ma) and ma.trace() give the same result. now raises TypeError instead of ValueError

This behaviour mimics that of other functions such as np.inner. If the two arguments cannot be cast to a common type, it could have raised a TypeError or ValueError depending on their order. Now, will now always raise a TypeError.
linalg.norm return type changes

The linalg.norm function now does all its computations in floating point and returns floating results. This change fixes bugs due to integer overflow and the failure of abs with signed integers of minimum value, e.g., int8(-128). For consistancy, floats are used even where an integer might work.
Views of arrays in Fortran order

The F_CONTIGUOUS flag was used to signal that views using a dtype that changed the element size would change the first index. This was always problematical for arrays that were both F_CONTIGUOUS and C_CONTIGUOUS because C_CONTIGUOUS took precedence. Relaxed stride checking results in more such dual contiguous arrays and breaks some existing code as a result. Note that this also affects changing the dtype by assigning to the dtype attribute of an array. The aim of this deprecation is to restrict views to C_CONTIGUOUS arrays at some future time. A work around that is backward compatible is to use a.T.view(...).T instead. A parameter may also be added to the view method to explicitly ask for Fortran order views, but that will not be backward compatible.
Invalid arguments for array ordering

It is currently possible to pass in arguments for the order parameter in methods like array.flatten or array.ravel that were not one of the following: 'C', 'F', 'A', 'K' (note that all of these possible values are both unicode and case insensitive). Such behavior will not be allowed in future releases.
Random number generator in the testing namespace

The Python standard library random number generator was previously exposed in the testing namespace as testing.rand. Using this generator is not recommended and it will be removed in a future release. Use generators from numpy.random namespace instead.
Random integer generation on a closed interval

In accordance with the Python C API, which gives preference to the half-open interval over the closed one, np.random.random_integers is being deprecated in favor of calling np.random.randint, which has been enhanced with the dtype parameter as described under "New Features". However, np.random.random_integers will not be removed anytime soon.
Assigning to slices/views of MaskedArray

Currently a slice of a masked array contains a view of the original data and a copy-on-write view of the mask. Consequently, any changes to the slice's mask will result in a copy of the original mask being made and that new mask being changed rather than the original. For example, if we make a slice of the original like so, view = original[:], then modifications to the data in one array will affect the data of the other but, because the mask will be copied during assignment operations, changes to the mask will remain local. A similar situation occurs when explicitly constructing a masked array using MaskedArray(data, mask), the returned array will contain a view of data but the mask will be a copy-on-write view of mask.

In the future, these cases will be normalized so that the data and mask arrays are treated the same way and modifications to either will propagate between views. In 1.11, numpy will issue a MaskedArrayFutureWarning warning whenever user code modifies the mask of a view that in the future may cause values to propagate back to the original. To silence these warnings and make your code robust against the upcoming changes, you have two options: if you want to keep the current behavior, call masked_view.unshare_mask() before modifying the mask. If you want to get the future behavior early, use masked_view._sharedmask = False. However, note that setting the _sharedmask attribute will break following explicit calls to masked_view.unshare_mask().

NumPy 1.10.4 Release Notes

This release is a bugfix source release motivated by a segfault regression. No windows binaries are provided for this release, as there appear to be bugs in the toolchain we use to generate those files. Hopefully that problem will be fixed for the next release. In the meantime, we suggest using one of the providers of windows binaries.
Compatibility notes

    The trace function now calls the trace method on subclasses of ndarray, except for matrix, for which the current behavior is preserved. This is to help with the units package of AstroPy and hopefully will not cause problems.

Issues Fixed

    gh-6922 BUG: numpy.recarray.sort segfaults on Windows.
    gh-6937 BUG: busday_offset does the wrong thing with modifiedpreceding roll.
    gh-6949 BUG: Type is lost when slicing a subclass of recarray.

Merged PRs

The following PRs have been merged into 1.10.4. When the PR is a backport, the PR number for the original PR against master is listed.

    gh-6840 TST: Update travis testing script in 1.10.x
    gh-6843 BUG: Fix use of python 3 only FileNotFoundError in test_f2py.
    gh-6884 REL: Update and to reflect current version.
    gh-6916 BUG: Fix test_f2py so it runs correctly in
    gh-6924 BUG: Fix segfault gh-6922.
    gh-6942 Fix datetime roll='modifiedpreceding' bug.
    gh-6943 DOC,BUG: Fix some latex generation problems.
    gh-6950 BUG trace is not subclass aware, np.trace(ma) != ma.trace().
    gh-6952 BUG recarray slices should preserve subclass.

NumPy 1.10.3 Release Notes

N/A this release did not happen due to various screwups involving PyPi.

NumPy 1.10.2 Release Notes

This release deals with a number of bugs that turned up in 1.10.1 and adds various build and release improvements.

Numpy 1.10.1 supports Python 2.6 - 2.7 and 3.2 - 3.5.
Compatibility notes
Relaxed stride checking is no longer the default

There were back compatibility problems involving views changing the dtype of multidimensional Fortran arrays that need to be dealt with over a longer timeframe.
Fix swig bug in numpy.i

Relaxed stride checking revealed a bug in array_is_fortran(a), that was using PyArray_ISFORTRAN to check for Fortran contiguity instead of PyArray_IS_F_CONTIGUOUS. You may want to regenerate swigged files using the updated numpy.i
Deprecate views changing dimensions in fortran order

This deprecates assignment of a new descriptor to the dtype attribute of a non-C-contiguous array if it result in changing the shape. This effectively bars viewing a multidimensional Fortran array using a dtype that changes the element size along the first axis.

The reason for the deprecation is that, when relaxed strides checking is enabled, arrays that are both C and Fortran contiguous are always treated as C contiguous which breaks some code that depended the two being mutually exclusive for non-scalar arrays of ndim > 1. This deprecation prepares the way to always enable relaxed stride checking.
Issues Fixed

    gh-6019 Masked array repr fails for structured array with multi-dimensional column.
    gh-6462 Median of empty array produces IndexError.
    gh-6467 Performance regression for record array access.
    gh-6468 numpy.interp uses 'left' value even when x[0]==xp[0].
    gh-6475 np.allclose returns a memmap when one of its arguments is a memmap.
    gh-6491 Error in broadcasting stride_tricks array.
    gh-6495 Unrecognized command line option '-ffpe-summary' in gfortran.
    gh-6497 Failure of reduce operation on recarrays.
    gh-6498 Mention change in default casting rule in 1.10 release notes.
    gh-6530 The partition function errors out on empty input.
    gh-6532 numpy.inner return wrong inaccurate value sometimes.
    gh-6563 Intent(out) broken in recent versions of f2py.
    gh-6569 Cannot run tests after 'python build_ext -i'
    gh-6572 Error in broadcasting stride_tricks array component.
    gh-6575 BUG: Split produces empty arrays with wrong number of dimensions
    gh-6590 Fortran Array problem in numpy 1.10.
    gh-6602 Random __all__ missing choice and dirichlet.
    gh-6611 no longer always returns a masked array in 1.10.
    gh-6618 NPY_FORTRANORDER in make_fortran() in numpy.i
    gh-6636 Memory leak in nested dtypes in numpy.recarray
    gh-6641 Subsetting recarray by fields yields a structured array.
    gh-6667 ma.make_mask handles ma.nomask input incorrectly.
    gh-6675 Optimized blas detection broken in master and 1.10.
    gh-6678 Getting unexpected error from: X.dtype = complex (or Y = X.view(complex))
    gh-6718 f2py test fail in pip installed numpy-1.10.1 in virtualenv.
    gh-6719 Error compiling Cython file: Pythonic division not allowed without gil.
    gh-6771 Numpy.rec.fromarrays losing dtype metadata between versions 1.9.2 and 1.10.1
    gh-6781 The travis-ci script in maintenance/1.10.x needs fixing.
    gh-6807 Windows testing errors for 1.10.2

Merged PRs

The following PRs have been merged into 1.10.2. When the PR is a backport, the PR number for the original PR against master is listed.

    gh-5773 MAINT: Hide testing helper tracebacks when using them with pytest.
    gh-6094 BUG: Fixed a bug with string representation of masked structured arrays.
    gh-6208 MAINT: Speedup field access by removing unneeded safety checks.
    gh-6460 BUG: Replacing the os.environ.clear by less invasive procedure.
    gh-6470 BUG: Fix AttributeError in numpy distutils.
    gh-6472 MAINT: Use Python 3.5 instead of 3.5-dev for travis 3.5 testing.
    gh-6474 REL: Update Paver script for sdist and auto-switch test warnings.
    gh-6478 BUG: Fix Intel compiler flags for OS X build.
    gh-6481 MAINT: LIBPATH with spaces is now supported Python 2.7+ and Win32.
    gh-6487 BUG: Allow nested use of parameters in definition of arrays in f2py.
    gh-6488 BUG: Extend common blocks rather than overwriting in f2py.
    gh-6499 DOC: Mention that default casting for inplace operations has changed.
    gh-6500 BUG: Recarrays viewed as subarrays don't convert to np.record type.
    gh-6501 REL: Add "make upload" command for built docs, update "make dist".
    gh-6526 BUG: Fix use of __doc__ in for -OO mode.
    gh-6527 BUG: Fix the IndexError when taking the median of an empty array.
    gh-6537 BUG: Make ma.atleast_* with scalar argument return arrays.
    gh-6538 BUG: Fix ma.masked_values does not shrink mask if requested.
    gh-6546 BUG: Fix inner product regression for non-contiguous arrays.
    gh-6553 BUG: Fix partition and argpartition error for empty input.
    gh-6556 BUG: Error in broadcast_arrays with as_strided array.
    gh-6558 MAINT: Minor update to "make upload" doc build command.
    gh-6562 BUG: Disable view safety checks in recarray.
    gh-6567 BUG: Revert some import * fixes in f2py.
    gh-6574 DOC: Release notes for Numpy 1.10.2.
    gh-6577 BUG: Fix for #6569, allowing build_ext --inplace
    gh-6579 MAINT: Fix mistake in doc upload rule.
    gh-6596 BUG: Fix swig for relaxed stride checking.
    gh-6606 DOC: Update 1.10.2 release notes.
    gh-6614 BUG: Add choice and dirichlet to numpy.random.__all__.
    gh-6621 BUG: Fix swig make_fortran function.
    gh-6628 BUG: Make allclose return python bool.
    gh-6642 BUG: Fix memleak in _convert_from_dict.
    gh-6643 ENH: make recarray.getitem return a recarray.
    gh-6653 BUG: Fix ma dot to always return masked array.
    gh-6668 BUG: ma.make_mask should always return nomask for nomask argument.
    gh-6686 BUG: Fix a bug in assert_string_equal.
    gh-6695 BUG: Fix removing tempdirs created during build.
    gh-6697 MAINT: Fix spurious semicolon in macro definition of PyArray_FROM_OT.
    gh-6698 TST: test np.rint bug for large integers.
    gh-6717 BUG: Readd fallback CBLAS detection on linux.
    gh-6721 BUG: Fix for #6719.
    gh-6726 BUG: Fix bugs exposed by relaxed stride rollback.
    gh-6757 BUG: link cblas library if cblas is detected.
    gh-6756 TST: only test f2py, not f2py2.7 etc, fixes #6718.
    gh-6747 DEP: Deprecate changing shape of non-C-contiguous array via descr.
    gh-6775 MAINT: Include from __future__ boilerplate in some files missing it.
    gh-6780 BUG: metadata is not copied to base_dtype.
    gh-6783 BUG: Fix travis ci testing for new google infrastructure.
    gh-6785 BUG: Quick and dirty fix for interp.
    gh-6813 TST,BUG: Make test_mvoid_multidim_print work for 32 bit systems.
    gh-6817 BUG: Disable 32-bit msvc9 compiler optimizations for npy_rint.
    gh-6819 TST: Fix test_mvoid_multidim_print failures on Python 2.x for Windows.

Initial support for mingwpy was reverted as it was causing problems for non-windows builds.

    gh-6536 BUG: Revert gh-5614 to fix non-windows build problems

A fix for np.lib.split was reverted because it resulted in "fixing" behavior that will be present in the Numpy 1.11 and that was already present in Numpy 1.9. See the discussion of the issue at gh-6575 for clarification.

    gh-6576 BUG: Revert gh-6376 to fix split behavior for empty arrays.

Relaxed stride checking was reverted. There were back compatibility problems involving views changing the dtype of multidimensional Fortran arrays that need to be dealt with over a longer timeframe.

    gh-6735 MAINT: Make no relaxed stride checking the default for 1.10.


A bug in the Numpy 1.10.1 release resulted in exceptions being raised for RuntimeWarning and DeprecationWarning in projects depending on Numpy. That has been fixed.

NumPy 1.10.1 Release Notes

This release deals with a few build problems that showed up in 1.10.0. Most users would not have seen these problems. The differences are:

    Compiling with msvc9 or msvc10 for 32 bit Windows now requires SSE2. This was the easiest fix for what looked to be some miscompiled code when SSE2 was not used. If you need to compile for 32 bit Windows systems without SSE2 support, mingw32 should still work.
    Make compiling with VS2008 python2.7 SDK easier
    Change Intel compiler options so that code will also be generated to support systems without SSE4.2.
    Some _config test functions needed an explicit integer return in order to avoid the openSUSE rpmlinter erring out.
    We ran into a problem with pipy not allowing reuse of filenames and a resulting proliferation of ..*.postN releases. Not only were the names getting out of hand, some packages were unable to work with the postN suffix.

Numpy 1.10.1 supports Python 2.6 - 2.7 and 3.2 - 3.5.


45a3d84 DEP: Remove warning for full when dtype is set. 0c1a5df BLD: import setuptools to allow compile with VS2008 python2.7 sdk 04211c6 BUG: mask nan to 1 in ordered compare 826716f DOC: Document the reason msvc requires SSE2 on 32 bit platforms. 49fa187 BLD: enable SSE2 for 32-bit msvc 9 and 10 compilers dcbc4cc MAINT: remove Wreturn-type warnings from config checks d6564cb BLD: do not build exclusively for SSE4.2 processors 15cb66f BLD: do not build exclusively for SSE4.2 processors c38bc08 DOC: fix var. reference in percentile docstring 78497f4 DOC: Sync 1.10.0-notes.rst in 1.10.x branch with master.

NumPy 1.10.0 Release Notes

This release supports Python 2.6 - 2.7 and 3.2 - 3.5.

    numpy.distutils now supports parallel compilation via the --parallel/-j argument passed to build
    numpy.distutils now supports additional customization via site.cfg to control compilation parameters, i.e. runtime libraries, extra linking/compilation flags.
    Addition of np.linalg.multi_dot: compute the dot product of two or more arrays in a single function call, while automatically selecting the fastest evaluation order.
    The new function np.stack provides a general interface for joining a sequence of arrays along a new axis, complementing np.concatenate for joining along an existing axis.
    Addition of nanprod to the set of nanfunctions.
    Support for the '@' operator in Python 3.5.

Dropped Support

    The _dotblas module has been removed. CBLAS Support is now in Multiarray.
    The file has been removed.
    The file has been removed.
    npy_PyFile_Dup and npy_PyFile_DupClose have been removed from npy_3kcompat.h.
    splitcmdline has been removed from numpy/distutils/
    try_run and get_output have been removed from numpy/distutils/command/
    The a._format attribute is no longer supported for array printing.
    Keywords skiprows and missing removed from np.genfromtxt.
    Keyword old_behavior removed from np.correlate.

Future Changes

    In array comparisons like arr1 == arr2, many corner cases involving strings or structured dtypes that used to return scalars now issue FutureWarning or DeprecationWarning, and in the future will be change to either perform elementwise comparisons or raise an error.
    In np.lib.split an empty array in the result always had dimension (0,) no matter the dimensions of the array being split. In Numpy 1.11 that behavior will be changed so that the dimensions will be preserved. A FutureWarning for this change has been in place since Numpy 1.9 but, due to a bug, sometimes no warning was raised and the dimensions were already preserved.
    The SafeEval class will be removed in Numpy 1.11.
    The alterdot and restoredot functions will be removed in Numpy 1.11.

See below for more details on these changes.
Compatibility notes
Default casting rule change

Default casting for inplace operations has changed to 'same_kind'. For instance, if n is an array of integers, and f is an array of floats, then n += f will result in a TypeError, whereas in previous Numpy versions the floats would be silently cast to ints. In the unlikely case that the example code is not an actual bug, it can be updated in a backward compatible way by rewriting it as np.add(n, f, out=n, casting='unsafe'). The old 'unsafe' default has been deprecated since Numpy 1.7.
numpy version string

The numpy version string for development builds has been changed from to x.y.z.dev0+githash (note the +) in order to comply with PEP 440.
relaxed stride checking

NPY_RELAXED_STRIDE_CHECKING is now true by default.

UPDATE: In 1.10.2 the default value of NPY_RELAXED_STRIDE_CHECKING was changed to false for back compatibility reasons. More time is needed before it can be made the default. As part of the roadmap a deprecation of dimension changing views of f_contiguous not c_contiguous arrays was also added.
Concatenation of 1d arrays along any but axis=0 raises IndexError

Using axis != 0 has raised a DeprecationWarning since NumPy 1.7, it now raises an error.
np.ravel, np.diagonal and np.diag now preserve subtypes

There was inconsistent behavior between x.ravel() and np.ravel(x), as well as between x.diagonal() and np.diagonal(x), with the methods preserving subtypes while the functions did not. This has been fixed and the functions now behave like the methods, preserving subtypes except in the case of matrices. Matrices are special cased for backward compatibility and still return 1-D arrays as before. If you need to preserve the matrix subtype, use the methods instead of the functions.
rollaxis and swapaxes always return a view

Previously, a view was returned except when no change was made in the order of the axes, in which case the input array was returned. A view is now returned in all cases.
nonzero now returns base ndarrays

Previously, an inconsistency existed between 1-D inputs (returning a base ndarray) and higher dimensional ones (which preserved subclasses). Behavior has been unified, and the return will now be a base ndarray. Subclasses can still override this behavior by providing their own nonzero method.

The changes to swapaxes also apply to the PyArray_SwapAxes C function, which now returns a view in all cases.

The changes to nonzero also apply to the PyArray_Nonzero C function, which now returns a base ndarray in all cases.

The dtype structure (PyArray_Descr) has a new member at the end to cache its hash value. This shouldn't affect any well-written applications.

The change to the concatenation function DeprecationWarning also affects PyArray_ConcatenateArrays,
recarray field return types

Previously the returned types for recarray fields accessed by attribute and by index were inconsistent, and fields of string type were returned as chararrays. Now, fields accessed by either attribute or indexing will return an ndarray for fields of non-structured type, and a recarray for fields of structured type. Notably, this affect recarrays containing strings with whitespace, as trailing whitespace is trimmed from chararrays but kept in ndarrays of string type. Also, the dtype.type of nested structured fields is now inherited.
recarray views

Viewing an ndarray as a recarray now automatically converts the dtype to np.record. See new record array documentation. Additionally, viewing a recarray with a non-structured dtype no longer converts the result's type to ndarray - the result will remain a recarray.
'out' keyword argument of ufuncs now accepts tuples of arrays

When using the 'out' keyword argument of a ufunc, a tuple of arrays, one per ufunc output, can be provided. For ufuncs with a single output a single array is also a valid 'out' keyword argument. Previously a single array could be provided in the 'out' keyword argument, and it would be used as the first output for ufuncs with multiple outputs, is deprecated, and will result in a DeprecationWarning now and an error in the future.
byte-array indices now raises an IndexError

Indexing an ndarray using a byte-string in Python 3 now raises an IndexError instead of a ValueError.
Masked arrays containing objects with arrays

For such (rare) masked arrays, getting a single masked item no longer returns a corrupted masked array, but a fully masked version of the item.
Median warns and returns nan when invalid values are encountered

Similar to mean, median and percentile now emits a Runtime warning and returns NaN in slices where a NaN is present. To compute the median or percentile while ignoring invalid values use the new nanmedian or nanpercentile functions.
Functions available from have changed

All functions from numpy.testing were once available from but not all of them were redefined to work with masked arrays. Most of those functions have now been removed from with a small subset retained in order to preserve backward compatibility. In the long run this should help avoid mistaken use of the wrong functions, but it may cause import problems for some.
New Features
Reading extra flags from site.cfg

Previously customization of compilation of dependency libraries and numpy itself was only accomblishable via code changes in the distutils package. Now numpy.distutils reads in the following extra flags from each group of the site.cfg:

    runtime_library_dirs/rpath, sets runtime library directories to override


    extra_compile_args, add extra flags to the compilation of sources

    extra_link_args, add extra flags when linking libraries

This should, at least partially, complete user customization.
np.cbrt to compute cube root for real floats

np.cbrt wraps the C99 cube root function cbrt. Compared to np.power(x, 1./3.) it is well defined for negative real floats and a bit faster.
numpy.distutils now allows parallel compilation

By passing --parallel=n or -j n to build the compilation of extensions is now performed in n parallel processes. The parallelization is limited to files within one extension so projects using Cython will not profit because it builds extensions from single files.
genfromtxt has a new max_rows argument

A max_rows argument has been added to genfromtxt to limit the number of rows read in a single call. Using this functionality, it is possible to read in multiple arrays stored in a single file by making repeated calls to the function.
New function np.broadcast_to for invoking array broadcasting

np.broadcast_to manually broadcasts an array to a given shape according to numpy's broadcasting rules. The functionality is similar to broadcast_arrays, which in fact has been rewritten to use broadcast_to internally, but only a single array is necessary.
New context manager clear_and_catch_warnings for testing warnings

When Python emits a warning, it records that this warning has been emitted in the module that caused the warning, in a module attribute __warningregistry__. Once this has happened, it is not possible to emit the warning again, unless you clear the relevant entry in __warningregistry__. This makes is hard and fragile to test warnings, because if your test comes after another that has already caused the warning, you will not be able to emit the warning or test it. The context manager clear_and_catch_warnings clears warnings from the module registry on entry and resets them on exit, meaning that warnings can be re-raised.
cov has new fweights and aweights arguments

The fweights and aweights arguments add new functionality to covariance calculations by applying two types of weighting to observation vectors. An array of fweights indicates the number of repeats of each observation vector, and an array of aweights provides their relative importance or probability.
Support for the '@' operator in Python 3.5+

Python 3.5 adds support for a matrix multiplication operator '@' proposed in PEP465. Preliminary support for that has been implemented, and an equivalent function matmul has also been added for testing purposes and use in earlier Python versions. The function is preliminary and the order and number of its optional arguments can be expected to change.
New argument norm to fft functions

The default normalization has the direct transforms unscaled and the inverse transforms are scaled by 1/n . It is possible to obtain unitary transforms by setting the keyword argument norm to "ortho" (default is None) so that both direct and inverse transforms will be scaled by 1/\\sqrt{n} .
np.digitize using binary search

np.digitize is now implemented in terms of np.searchsorted. This means that a binary search is used to bin the values, which scales much better for larger number of bins than the previous linear search. It also removes the requirement for the input array to be 1-dimensional.
np.poly now casts integer inputs to float

np.poly will now cast 1-dimensional input arrays of integer type to double precision floating point, to prevent integer overflow when computing the monic polynomial. It is still possible to obtain higher precision results by passing in an array of object type, filled e.g. with Python ints.
np.interp can now be used with periodic functions

np.interp now has a new parameter period that supplies the period of the input data xp. In such case, the input data is properly normalized to the given period and one end point is added to each extremity of xp in order to close the previous and the next period cycles, resulting in the correct interpolation behavior.
np.pad supports more input types for pad_width and constant_values

constant_values parameters now accepts NumPy arrays and float values. NumPy arrays are supported as input for pad_width, and an exception is raised if its values are not of integral type.
np.argmax and np.argmin now support an out argument

The out parameter was added to np.argmax and np.argmin for consistency with ndarray.argmax and ndarray.argmin. The new parameter behaves exactly as it does in those methods.
More system C99 complex functions detected and used

All of the functions in complex.h are now detected. There are new fallback implementations of the following functions.

    npy_cacos, npy_casin, npy_catan
    npy_ccosh, npy_csinh, npy_ctanh,
    npy_cacosh, npy_casinh, npy_catanh

As a result of these improvements, there will be some small changes in returned values, especially for corner cases.
np.loadtxt support for the strings produced by the float.hex method

The strings produced by float.hex look like 0x1.921fb54442d18p+1, so this is not the hex used to represent unsigned integer types.
np.isclose properly handles minimal values of integer dtypes

In order to properly handle minimal values of integer types, np.isclose will now cast to the float dtype during comparisons. This aligns its behavior with what was provided by np.allclose.
np.allclose uses np.isclose internally.

np.allclose now uses np.isclose internally and inherits the ability to compare NaNs as equal by setting equal_nan=True. Subclasses, such as, are also preserved now.
np.genfromtxt now handles large integers correctly

np.genfromtxt now correctly handles integers larger than 2**31-1 on 32-bit systems and larger than 2**63-1 on 64-bit systems (it previously crashed with an OverflowError in these cases). Integers larger than 2**63-1 are converted to floating-point values.
np.load, have pickle backward compatibility flags

The functions np.load and have additional keyword arguments for controlling backward compatibility of pickled Python objects. This enables Numpy on Python 3 to load npy files containing object arrays that were generated on Python 2.
MaskedArray support for more complicated base classes

Built-in assumptions that the baseclass behaved like a plain array are being removed. In particular, setting and getting elements and ranges will respect baseclass overrides of __setitem__ and __getitem__, and arithmetic will respect overrides of __add__, __sub__, etc.
dotblas functionality moved to multiarray

The cblas versions of dot, inner, and vdot have been integrated into the multiarray module. In particular, vdot is now a multiarray function, which it was not before.
stricter check of gufunc signature compliance

Inputs to generalized universal functions are now more strictly checked against the function's signature: all core dimensions are now required to be present in input arrays; core dimensions with the same label must have the exact same size; and output core dimension's must be specified, either by a same label input core dimension or by a passed-in output array.
views returned from np.einsum are writeable

Views returned by np.einsum will now be writeable whenever the input array is writeable.
np.argmin skips NaT values

np.argmin now skips NaT values in datetime64 and timedelta64 arrays, making it consistent with np.min, np.argmax and np.max.
Array comparisons involving strings or structured dtypes

Normally, comparison operations on arrays perform elementwise comparisons and return arrays of booleans. But in some corner cases, especially involving strings are structured dtypes, NumPy has historically returned a scalar instead. For example:

### Current behaviour

np.arange(2) == "foo"
# -> False

np.arange(2) < "foo"
# -> True on Python 2, error on Python 3

np.ones(2, dtype="i4,i4") == np.ones(2, dtype="i4,i4,i4")
# -> False

Continuing work started in 1.9, in 1.10 these comparisons will now raise FutureWarning or DeprecationWarning, and in the future they will be modified to behave more consistently with other comparison operations, e.g.:

### Future behaviour

np.arange(2) == "foo"
# -> array([False, False])

np.arange(2) < "foo"
# -> error, strings and numbers are not orderable

np.ones(2, dtype="i4,i4") == np.ones(2, dtype="i4,i4,i4")
# -> [False, False]


The SafeEval class in numpy/lib/ is deprecated and will be removed in the next release.
alterdot, restoredot

The alterdot and restoredot functions no longer do anything, and are deprecated.
pkgload, PackageLoader

These ways of loading packages are now deprecated.
bias, ddof arguments to corrcoef

The values for the bias and ddof arguments to the corrcoef function canceled in the division implied by the correlation coefficient and so had no effect on the returned values.

We now deprecate these arguments to corrcoef and the masked array version ma.corrcoef.

Because we are deprecating the bias argument to ma.corrcoef, we also deprecate the use of the allow_masked argument as a positional argument, as its position will change with the removal of bias. allow_masked will in due course become a keyword-only argument.
dtype string representation changes

Since 1.6, creating a dtype object from its string representation, e.g. 'f4', would issue a deprecation warning if the size did not correspond to an existing type, and default to creating a dtype of the default size for the type. Starting with this release, this will now raise a TypeError.

The only exception is object dtypes, where both 'O4' and 'O8' will still issue a deprecation warning. This platform-dependent representation will raise an error in the next release.

In preparation for this upcoming change, the string representation of an object dtype, i.e. np.dtype(object).str, no longer includes the item size, i.e. will return '|O' instead of '|O4' or '|O8' as before.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Apr 17 00:41:38 2015 UTC (4 years ago) by wen
Branch: MAIN
CVS Tags: pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2
Changes since 1.27: +3 -14 lines
Diff to previous 1.27 (colored)

Update to 1.9.2

Reviewed by:	wiz@

Upstream changes:
NumPy 1.9.2 Release Notes

This is a bugfix only release in the 1.9.x series.

Issues fixed

* `#5316 <>`__: fix too large dtype alignment of strings and complex types
* `#5424 <>`__: fix ma.median when used on ndarrays
* `#5481 <>`__: Fix astype for structured array fields of different byte order
* `#5354 <>`__: fix segfault when clipping complex arrays
* `#5524 <>`__: allow np.argpartition on non ndarrays
* `#5612 <>`__: Fixes ndarray.fill to accept full range of uint64
* `#5155 <>`__: Fix loadtxt with comments=None and a string None data
* `#4476 <>`__: Masked array view fails if structured dtype has datetime component
* `#5388 <>`__: Make RandomState.set_state and RandomState.get_state threadsafe
* `#5390 <>`__: make seed, randint and shuffle threadsafe
* `#5374 <>`__: Fixed incorrect assert_array_almost_equal_nulp documentation
* `#5393 <>`__: Add support for ATLAS > 3.9.33.
* `#5313 <>`__: PyArray_AsCArray caused segfault for 3d arrays
* `#5492 <>`__: handle out of memory in rfftf
* `#4181 <>`__: fix a few bugs in the random.pareto docstring
* `#5359 <>`__: minor changes to linspace docstring
* `#4723 <>`__: fix a compile issues on AIX

NumPy 1.9.1 Release Notes

This is a bugfix only release in the 1.9.x series.

Issues fixed

* gh-5184: restore linear edge behaviour of gradient to as it was in < 1.9.
  The second order behaviour is available via the `edge_order` keyword
* gh-4007: workaround Accelerate sgemv crash on OSX 10.9
* gh-5100: restore object dtype inference from iterable objects without `len()`
* gh-5163: avoid gcc-4.1.2 (red hat 5) miscompilation causing a crash
* gh-5138: fix nanmedian on arrays containing inf
* gh-5240: fix not returning out array from ufuncs with subok=False set
* gh-5203: copy inherited masks in MaskedArray.__array_finalize__
* gh-2317: genfromtxt did not handle filling_values=0 correctly
* gh-5067: restore api of npy_PyFile_DupClose in python2
* gh-5063: cannot convert invalid sequence index to tuple
* gh-5082: Segmentation fault with argmin() on unicode arrays
* gh-5095: don't propagate subtypes from np.where
* gh-5104: np.inner segfaults with SciPy's sparse matrices
* gh-5251: Issue with fromarrays not using correct format for unicode arrays
* gh-5136: Import dummy_threading if importing threading fails
* gh-5148: Make numpy import when run with Python flag '-OO'
* gh-5147: Einsum double contraction in particular order causes ValueError
* gh-479: Make f2py work with intent(in out)
* gh-5170: Make python2 .npy files readable in python3
* gh-5027: Use 'll' as the default length specifier for long long
* gh-4896: fix build error with MSVC 2013 caused by C99 complex support
* gh-4465: Make PyArray_PutTo respect writeable flag
* gh-5225: fix crash when using arange on datetime without dtype set
* gh-5231: fix build in c99 mode

NumPy 1.9.0 Release Notes

This release supports Python 2.6 - 2.7 and 3.2 - 3.4.

* Numerous performance improvements in various areas, most notably indexing and
  operations on small arrays are significantly faster.
  Indexing operations now also release the GIL.
* Addition of `nanmedian` and `nanpercentile` rounds out the nanfunction set.

Dropped Support

* The oldnumeric and numarray modules have been removed.
* The doc/pyrex and doc/cython directories have been removed.
* The doc/numpybook directory has been removed.
* The numpy/testing/ file has been removed together with
  the importall function it contained.

Future Changes

* The numpy/polynomial/ file will be removed in NumPy 1.10.0.
* Default casting for inplace operations will change to 'same_kind' in
  Numpy 1.10.0. This will certainly break some code that is currently
  ignoring the warning.
* Relaxed stride checking will be the default in 1.10.0
* String version checks will break because, e.g., '1.9' > '1.10' is True. A
  NumpyVersion class has been added that can be used for such comparisons.
* The diagonal and diag functions will return writeable views in 1.10.0
* The `S` and/or `a` dtypes may be changed to represent Python strings
  instead of bytes, in Python 3 these two types are very different.

Compatibility notes

The diagonal and diag functions return readonly views.
In NumPy 1.8, the diagonal and diag functions returned readonly copies, in
NumPy 1.9 they return readonly views, and in 1.10 they will return writeable

Special scalar float values don't cause upcast to double anymore
In previous numpy versions operations involving floating point scalars
containing special values ``NaN``, ``Inf`` and ``-Inf`` caused the result
type to be at least ``float64``.  As the special values can be represented
in the smallest available floating point type, the upcast is not performed

For example the dtype of:

    ``np.array([1.], dtype=np.float32) * float('nan')``

now remains ``float32`` instead of being cast to ``float64``.
Operations involving non-special values have not been changed.

Percentile output changes
If given more than one percentile to compute numpy.percentile returns an
array instead of a list. A single percentile still returns a scalar.  The
array is equivalent to converting the list returned in older versions
to an array via ``np.array``.

If the ``overwrite_input`` option is used the input is only partially
instead of fully sorted.

ndarray.tofile exception type
All ``tofile`` exceptions are now ``IOError``, some were previously

Invalid fill value exceptions
Two changes to

* When the fill value is a string and the array type is not one of
  'OSUV', TypeError is raised instead of the default fill value being used.

* When the fill value overflows the array type, TypeError is raised instead
  of OverflowError.

Polynomial Classes no longer derived from PolyBase
This may cause problems with folks who depended on the polynomial classes
being derived from PolyBase. They are now all derived from the abstract
base class ABCPolyBase. Strictly speaking, there should be a deprecation
involved, but no external code making use of the old baseclass could be

Using numpy.random.binomial may change the RNG state vs. numpy < 1.9
A bug in one of the algorithms to generate a binomial random variate has
been fixed. This change will likely alter the number of random draws
performed, and hence the sequence location will be different after a
call to distribution.c::rk_binomial_btpe. Any tests which rely on the RNG
being in a known state should be checked and/or updated as a result.

Random seed enforced to be a 32 bit unsigned integer
``np.random.seed`` and ``np.random.RandomState`` now throw a ``ValueError``
if the seed cannot safely be converted to 32 bit unsigned integers.
Applications that now fail can be fixed by masking the higher 32 bit values to
zero: ``seed = seed & 0xFFFFFFFF``. This is what is done silently in older
versions so the random stream remains the same.

Argmin and argmax out argument
The ``out`` argument to ``np.argmin`` and ``np.argmax`` and their
equivalent C-API functions is now checked to match the desired output shape
exactly.  If the check fails a ``ValueError`` instead of ``TypeError`` is

Remove unnecessary broadcasting notation restrictions.
``np.einsum('ijk,j->ijk', A, B)`` can also be written as
``np.einsum('ij...,j->ij...', A, B)`` (ellipsis is no longer required on 'j')


The NumPy indexing has seen a complete rewrite in this version. This makes
most advanced integer indexing operations much faster and should have no
other implications.  However some subtle changes and deprecations were
introduced in advanced indexing operations:

* Boolean indexing into scalar arrays will always return a new 1-d array.
  This means that ``array(1)[array(True)]`` gives ``array([1])`` and
  not the original array.

* Advanced indexing into one dimensional arrays used to have
  (undocumented) special handling regarding repeating the value array in
  assignments when the shape of the value array was too small or did not
  match.  Code using this will raise an error. For compatibility you can
  use ``arr.flat[index] = values``, which uses the old code branch.  (for
  example ``a = np.ones(10); a[np.arange(10)] = [1, 2, 3]``)

* The iteration order over advanced indexes used to be always C-order.
  In NumPy 1.9. the iteration order adapts to the inputs and is not
  guaranteed (with the exception of a *single* advanced index which is
  never reversed for compatibility reasons). This means that the result
  is undefined if multiple values are assigned to the same element.  An
  example for this is ``arr[[0, 0], [1, 1]] = [1, 2]``, which may set
  ``arr[0, 1]`` to either 1 or 2.

* Equivalent to the iteration order, the memory layout of the advanced
  indexing result is adapted for faster indexing and cannot be predicted.

* All indexing operations return a view or a copy. No indexing operation
  will return the original array object. (For example ``arr[...]``)

* In the future Boolean array-likes (such as lists of python bools) will
  always be treated as Boolean indexes and Boolean scalars (including
  python ``True``) will be a legal *boolean* index. At this time, this is
  already the case for scalar arrays to allow the general
  ``positive = a[a > 0]`` to work when ``a`` is zero dimensional.

* In NumPy 1.8 it was possible to use ``array(True)`` and
  ``array(False)`` equivalent to 1 and 0 if the result of the operation
  was a scalar.  This will raise an error in NumPy 1.9 and, as noted
  above, treated as a boolean index in the future.

* All non-integer array-likes are deprecated, object arrays of custom
  integer like objects may have to be cast explicitly.

* The error reporting for advanced indexing is more informative, however
  the error type has changed in some cases. (Broadcasting errors of
  indexing arrays are reported as ``IndexError``)

* Indexing with more then one ellipsis (``...``) is deprecated.

Non-integer reduction axis indexes are deprecated
Non-integer axis indexes to reduction ufuncs like `add.reduce` or `sum` are

``promote_types`` and string dtype
``promote_types`` function now returns a valid string length when given an
integer or float dtype as one argument and a string dtype as another
argument.  Previously it always returned the input string dtype, even if it
wasn't long enough to store the max integer/float value converted to a

``can_cast`` and string dtype
``can_cast`` function now returns False in "safe" casting mode for
integer/float dtype and string dtype if the string dtype length is not long
enough to store the max integer/float value converted to a string.
Previously ``can_cast`` in "safe" mode returned True for integer/float
dtype and a string dtype of any length.

astype and string dtype
The ``astype`` method now returns an error if the string dtype to cast to
is not long enough in "safe" casting mode to hold the max value of
integer/float array that is being casted. Previously the casting was
allowed even if the result was truncated.

`npyio.recfromcsv` keyword arguments change
`npyio.recfromcsv` no longer accepts the undocumented `update` keyword,
which used to override the `dtype` keyword.

The ``doc/swig`` directory moved
The ``doc/swig`` directory has been moved to ``tools/swig``.

The ``npy_3kcompat.h`` header changed
The unused ``simple_capsule_dtor`` function has been removed from
``npy_3kcompat.h``.  Note that this header is not meant to be used outside
of numpy; other projects should be using their own copy of this file when

Negative indices in C-Api ``sq_item`` and ``sq_ass_item`` sequence methods
When directly accessing the ``sq_item`` or ``sq_ass_item`` PyObject slots
for item getting, negative indices will not be supported anymore.
``PySequence_GetItem`` and ``PySequence_SetItem`` however fix negative
indices so that they can be used there.

When ``NpyIter_RemoveAxis`` is now called, the iterator range will be reset.

When a multi index is being tracked and an iterator is not buffered, it is
possible to use ``NpyIter_RemoveAxis``. In this case an iterator can shrink
in size. Because the total size of an iterator is limited, the iterator
may be too large before these calls. In this case its size will be set to ``-1``
and an error issued not at construction time but when removing the multi
index, setting the iterator range, or getting the next function.

This has no effect on currently working code, but highlights the necessity
of checking for an error return if these conditions can occur. In most
cases the arrays being iterated are as large as the iterator so that such
a problem cannot occur.

This change was already applied to the 1.8.1 release.

``zeros_like`` for string dtypes now returns empty strings
To match the `zeros` function `zeros_like` now returns an array initialized
with empty strings instead of an array filled with `'0'`.

New Features

Percentile supports more interpolation options
``np.percentile`` now has the interpolation keyword argument to specify in
which way points should be interpolated if the percentiles fall between two
values.  See the documentation for the available options.

Generalized axis support for median and percentile
``np.median`` and ``np.percentile`` now support generalized axis arguments like
ufunc reductions do since 1.7. One can now say axis=(index, index) to pick a
list of axes for the reduction. The ``keepdims`` keyword argument was also
added to allow convenient broadcasting to arrays of the original shape.

Dtype parameter added to ``np.linspace`` and ``np.logspace``
The returned data type from the ``linspace`` and ``logspace`` functions can
now be specified using the dtype parameter.

More general ``np.triu`` and ``np.tril`` broadcasting
For arrays with ``ndim`` exceeding 2, these functions will now apply to the
final two axes instead of raising an exception.

``tobytes`` alias for ``tostring`` method
``ndarray.tobytes`` and ``MaskedArray.tobytes`` have been added as aliases
for ``tostring`` which exports arrays as ``bytes``. This is more consistent
in Python 3 where ``str`` and ``bytes`` are not the same.

Build system
Added experimental support for the ppc64le and OpenRISC architecture.

Compatibility to python ``numbers`` module
All numerical numpy types are now registered with the type hierarchy in
the python ``numbers`` module.

``increasing`` parameter added to ``np.vander``
The ordering of the columns of the Vandermonde matrix can be specified with
this new boolean argument.

``unique_counts`` parameter added to ``np.unique``
The number of times each unique item comes up in the input can now be
obtained as an optional return value.

Support for median and percentile in nanfunctions
The ``np.nanmedian`` and ``np.nanpercentile`` functions behave like
the median and percentile functions except that NaNs are ignored.

NumpyVersion class added
The class may be imported from numpy.lib and can be used for version
comparison when the numpy version goes to 1.10.devel. For example::

    >>> from numpy.lib import NumpyVersion
    >>> if NumpyVersion(np.__version__) < '1.10.0'):
    ...     print('Wow, that is an old NumPy version!')

Allow saving arrays with large number of named columns
The numpy storage format 1.0 only allowed the array header to have a total size
of 65535 bytes. This can be exceeded by structured arrays with a large number
of columns. A new format 2.0 has been added which extends the header size to 4
GiB. `` will automatically save in 2.0 format if the data requires it,
else it will always use the more compatible 1.0 format.

Full broadcasting support for ``np.cross``
``np.cross`` now properly broadcasts its two input arrays, even if they
have different number of dimensions. In earlier versions this would result
in either an error being raised, or wrong results computed.


Better numerical stability for sum in some cases
Pairwise summation is now used in the sum method, but only along the fast
axis and for groups of the values <= 8192 in length. This should also
improve the accuracy of var and std in some common cases.

Percentile implemented in terms of ``np.partition``
``np.percentile`` has been implemented in terms of ``np.partition`` which
only partially sorts the data via a selection algorithm. This improves the
time complexity from ``O(nlog(n))`` to ``O(n)``.

Performance improvement for ``np.array``
The performance of converting lists containing arrays to arrays using
``np.array`` has been improved. It is now equivalent in speed to

Performance improvement for ``np.searchsorted``
For the built-in numeric types, ``np.searchsorted`` no longer relies on the
data type's ``compare`` function to perform the search, but is now
implemented by type specific functions. Depending on the size of the
inputs, this can result in performance improvements over 2x.

Optional reduced verbosity for np.distutils
Set ``numpy.distutils.system_info.system_info.verbosity = 0`` and then
calls to ``numpy.distutils.system_info.get_info('blas_opt')`` will not
print anything on the output. This is mostly for other packages using

Covariance check in ``np.random.multivariate_normal``
A ``RuntimeWarning`` warning is raised when the covariance matrix is not

Polynomial Classes no longer template based
The polynomial classes have been refactored to use an abstract base class
rather than a template in order to implement a common interface. This makes
importing the polynomial package faster as the classes do not need to be
compiled on import.

More GIL releases
Several more functions now release the Global Interpreter Lock allowing more
efficient parallization using the ``threading`` module. Most notably the GIL is
now released for fancy indexing, ``np.where`` and the ``random`` module now
uses a per-state lock instead of the GIL.

MaskedArray support for more complicated base classes
Built-in assumptions that the baseclass behaved like a plain array are being
removed. In particalur, ``repr`` and ``str`` should now work more reliably.



Non-integer scalars for sequence repetition
Using non-integer numpy scalars to repeat python sequences is deprecated.
For example ``np.float_(2) * [1]`` will be an error in the future.

``select`` input deprecations
The integer and empty input to ``select`` is deprecated. In the future only
boolean arrays will be valid conditions and an empty ``condlist`` will be
considered an input error instead of returning the default.

``rank`` function
The ``rank`` function has been deprecated to avoid confusion with

Object array equality comparisons
In the future object array comparisons both `==` and `np.equal` will not
make use of identity checks anymore. For example:

>>> a = np.array([np.array([1, 2, 3]), 1])
>>> b = np.array([np.array([1, 2, 3]), 1])
>>> a == b

will consistently return False (and in the future an error) even if the array
in `a` and `b` was the same object.

The equality operator `==` will in the future raise errors like `np.equal`
if broadcasting or element comparisons, etc. fails.

Comparison with `arr == None` will in the future do an elementwise comparison
instead of just returning False. Code should be using `arr is None`.

All of these changes will give Deprecation- or FutureWarnings at this time.


The utility function npy_PyFile_Dup and npy_PyFile_DupClose are broken by the
internal buffering python 3 applies to its file objects.
To fix this two new functions npy_PyFile_Dup2 and npy_PyFile_DupClose2 are
declared in npy_3kcompat.h and the old functions are deprecated.
Due to the fragile nature of these functions it is recommended to instead use
the python API when possible.

This change was already applied to the 1.8.1 release.

NumPy 1.8.2 Release Notes

This is a bugfix only release in the 1.8.x series.

Issues fixed

* gh-4836: partition produces wrong results for multiple selections in equal ranges
* gh-4656: Make fftpack._raw_fft threadsafe
* gh-4628: incorrect argument order to _copyto in in np.nanmax, np.nanmin
* gh-4642: Hold GIL for converting dtypes types with fields
* gh-4733: fix np.linalg.svd(b, compute_uv=False)
* gh-4853: avoid unaligned simd load on reductions on i386
* gh-4722: Fix seg fault converting empty string to object
* gh-4613: Fix lack of NULL check in array_richcompare
* gh-4774: avoid unaligned access for strided byteswap
* gh-650: Prevent division by zero when creating arrays from some buffers
* gh-4602: ifort has issues with optimization flag O2, use O1
NumPy 1.8.1 Release Notes

This is a bugfix only release in the 1.8.x series.

Issues fixed

* gh-4276: Fix mean, var, std methods for object arrays
* gh-4262: remove insecure mktemp usage
* gh-2385: absolute(complex(inf)) raises invalid warning in python3
* gh-4024: Sequence assignment doesn't raise exception on shape mismatch
* gh-4027: Fix chunked reading of strings longer than BUFFERSIZE
* gh-4109: Fix object scalar return type of 0-d array indices
* gh-4018: fix missing check for memory allocation failure in ufuncs
* gh-4156: high order linalg.norm discards imaginary elements of complex arrays
* gh-4144: linalg: norm fails on longdouble, signed int
* gh-4094: fix NaT handling in _strided_to_strided_string_to_datetime
* gh-4051: fix uninitialized use in _strided_to_strided_string_to_datetime
* gh-4093: Loading compressed .npz file fails under Python 2.6.6
* gh-4138: segfault with non-native endian memoryview in python 3.4
* gh-4123: Fix missing NULL check in lexsort
* gh-4170: fix native-only long long check in memoryviews
* gh-4187: Fix large file support on 32 bit
* gh-4152: fromfile: ensure file handle positions are in sync in python3
* gh-4176: clang compatibility: Typos in conversion_utils
* gh-4223: Fetching a non-integer item caused array return
* gh-4197: fix minor memory leak in memoryview failure case
* gh-4206: fix build with single-threaded python
* gh-4220: add versionadded:: 1.8.0 to docstring
* gh-4267: improve handling of memory allocation failure
* gh-4267: fix use of capi without gil in
* gh-4261: Detect vendor versions of GNU Compilers
* gh-4253: IRR was returning nan instead of valid negative answer
* gh-4254: fix unnecessary byte order flag change for byte arrays
* gh-3263: numpy.random.shuffle clobbers mask of a MaskedArray
* gh-4270: np.random.shuffle not work with flexible dtypes
* gh-3173: Segmentation fault when 'size' argument to random.multinomial
* gh-2799: allow using unique with lists of complex
* gh-3504: fix linspace truncation for integer array scalar
* gh-4191: get_info('openblas') does not read libraries key
* gh-3348: Access violation in _descriptor_from_pep3118_format
* gh-3175: segmentation fault with numpy.array() from bytearray
* gh-4266: histogramdd - wrong result for entries very close to last boundary
* gh-4408: Fix stride_stricks.as_strided function for object arrays
* gh-4225: fix log1p and exmp1 return for np.inf on windows compiler builds
* gh-4359: Fix infinite recursion in str.format of flex arrays
* gh-4145: Incorrect shape of broadcast result with the exponent operator
* gh-4483: Fix commutativity of {dot,multiply,inner}(scalar, matrix_of_objs)
* gh-4466: Delay npyiter size check when size may change
* gh-4485: Buffered stride was erroneously marked fixed
* gh-4354: byte_bounds fails with datetime dtypes
* gh-4486: segfault/error converting from/to high-precision datetime64 objects
* gh-4428: einsum(None, None, None, None) causes segfault
* gh-4134: uninitialized use for for size 1 object reductions


When ``NpyIter_RemoveAxis`` is now called, the iterator range will be reset.

When a multi index is being tracked and an iterator is not buffered, it is
possible to use ``NpyIter_RemoveAxis``. In this case an iterator can shrink
in size. Because the total size of an iterator is limited, the iterator
may be too large before these calls. In this case its size will be set to ``-1``
and an error issued not at construction time but when removing the multi
index, setting the iterator range, or getting the next function.

This has no effect on currently working code, but highlights the necessity
of checking for an error return if these conditions can occur. In most
cases the arrays being iterated are as large as the iterator so that such
a problem cannot occur.

Optional reduced verbosity for np.distutils
Set ``numpy.distutils.system_info.system_info.verbosity = 0`` and then
calls to ``numpy.distutils.system_info.get_info('blas_opt')`` will not
print anything on the output. This is mostly for other packages using



The utility function npy_PyFile_Dup and npy_PyFile_DupClose are broken by the
internal buffering python 3 applies to its file objects.
To fix this two new functions npy_PyFile_Dup2 and npy_PyFile_DupClose2 are
declared in npy_3kcompat.h and the old functions are deprecated.
Due to the fragile nature of these functions it is recommended to instead use
the python API when possible.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Feb 28 09:43:10 2014 UTC (5 years, 1 month ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1
Changes since 1.26: +10 -12 lines
Diff to previous 1.26 (colored)

Changes 1.8.0:
* New, no 2to3, Python 2 and Python 3 are supported by a common code base.
* New, gufuncs for linear algebra, enabling operations on stacked arrays.
* New, inplace fancy indexing for ufuncs with the ``.at`` method.
* New, ``partition`` function, partial sorting via selection for fast median.
* New, ``nanmean``, ``nanvar``, and ``nanstd`` functions skipping NaNs.
* New, ``full`` and ``full_like`` functions to create value initialized arrays.
* New, ``PyUFunc_RegisterLoopForDescr``, better ufunc support for user dtypes.
* Numerous performance improvements in many areas.
* Support for Python versions 2.4 and 2.5 has been dropped.
* Support for SCons has been removed.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jan 25 10:30:13 2014 UTC (5 years, 3 months ago) by wiz
Branch: MAIN
Changes since 1.25: +1 -2 lines
Diff to previous 1.25 (colored)

Mark packages as not ready for python-3.x where applicable;
either because they themselves are not ready or because a
dependency isn't. This is annotated by
PYTHON_VERSIONS_INCOMPATIBLE=  33 # not yet ported as of x.y.z
respectively, please use the same style for other packages,
and check during updates.

Use where applicable.
Use REPLACE_PYTHON instead of handcoded alternatives, where applicable.
Reorder Makefile sections into standard order, where applicable.

Remove PYTHON_VERSIONS_INCLUDE_3X lines since that will be default
with the next commit.

Whitespace cleanups and other nits corrected, where necessary.

Revision 1.25 / (download) - annotate - [select for diffs], Mon May 20 05:59:58 2013 UTC (5 years, 11 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2
Changes since 1.24: +32 -19 lines
Diff to previous 1.24 (colored)

Changes 1.7.1:
gh-2973   Fix `1` is printed during numpy.test()
gh-2983   BUG: gh-2969: Backport memory leak fix 80b3a34.
gh-3007   Backport gh-3006
gh-2984   Backport fix complex polynomial fit
gh-2982   BUG: Make nansum work with booleans.
gh-2985   Backport large sort fixes
gh-3039   Backport object take
gh-3105   Backport nditer fix op axes initialization
gh-3108   BUG: npy-pkg-config ini files were missing after Bento build.
gh-3124   BUG: PyArray_LexSort allocates too much temporary memory.
gh-3131   BUG: Exported f2py_size symbol prevents linking multiple f2py
gh-3117   Backport gh-2992
gh-3135   DOC: Add mention of PyArray_SetBaseObject stealing a reference
gh-3134   DOC: Fix typo in fft docs (the indexing variable is 'm', not 'n').
gh-3136   Backport 3128

Revision 1.24 / (download) - annotate - [select for diffs], Thu Feb 21 10:59:38 2013 UTC (6 years, 2 months ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2013Q1-base, pkgsrc-2013Q1
Changes since 1.23: +10 -2 lines
Diff to previous 1.23 (colored)

Ensure the correct compiler ABI flag is used when this package does
its own builds for dependencies.  Fixes issue on SunOS 32-bit when
the native gfortran produces 64-bit by default.


Revision 1.23 / (download) - annotate - [select for diffs], Tue Sep 11 23:04:31 2012 UTC (6 years, 7 months ago) by asau
Branch: MAIN
CVS Tags: pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3
Changes since 1.22: +1 -3 lines
Diff to previous 1.22 (colored)

"user-destdir" is default these days

Revision 1.22 / (download) - annotate - [select for diffs], Wed Aug 15 17:16:37 2012 UTC (6 years, 8 months ago) by drochner
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

update to 1.6.2
changes: bugfixes

pkgsrc change: mark Python3 ready

Revision 1.21 / (download) - annotate - [select for diffs], Tue Aug 14 21:04:21 2012 UTC (6 years, 8 months ago) by fhajny
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

The previous commit actually doesn't affect the build of math/py-numpy,
but changes the py-numpy binary package in order for math/py-scipy to build
successfully (at least on SmartOS). Bump PKGREVISION.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Aug 14 20:19:20 2012 UTC (6 years, 8 months ago) by fhajny
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Fix build on SmartOS by making sure linker always gets -shared

Revision 1.19 / (download) - annotate - [select for diffs], Thu Aug 9 12:42:16 2012 UTC (6 years, 8 months ago) by jperkin
Branch: MAIN
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored)

Pass through the correct ABI flags as this package calls compilers directly.

Fixes build on Solaris where ABI=32 with 64-bit compilers.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Apr 25 16:36:39 2012 UTC (7 years ago) by hans
Branch: MAIN
CVS Tags: pkgsrc-2012Q2-base, pkgsrc-2012Q2
Changes since 1.17: +5 -1 lines
Diff to previous 1.17 (colored)

Always add -shared to LDFLAGS to work around some stupidity. Should fix
pkg/44107, tested on SunOS and NetBSD. More can be found information here:

Revision 1.17 / (download) - annotate - [select for diffs], Tue Apr 17 17:24:41 2012 UTC (7 years ago) by drochner
Branch: MAIN
Changes since 1.16: +3 -4 lines
Diff to previous 1.16 (colored)

update to 1.6.1
changes: any new features, performance improvements and bug fixes,
Some highlights are:
-Re-introduction of datetime dtype support to deal with dates in arrays.
-A new 16-bit floating point type.
-A new iterator, which improves performance of many functions.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Feb 9 13:09:09 2012 UTC (7 years, 2 months ago) by obache
Branch: MAIN
CVS Tags: pkgsrc-2012Q1-base, pkgsrc-2012Q1
Changes since 1.15: +4 -5 lines
Diff to previous 1.15 (colored)

distutils pkg, register egg-info.


Revision 1.15 / (download) - annotate - [select for diffs], Tue Dec 20 16:38:30 2011 UTC (7 years, 4 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2011Q4-base, pkgsrc-2011Q4
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Make sure that builds with g95 create position independent code.
Bump revision.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Apr 19 15:32:28 2011 UTC (8 years ago) by roy
Branch: MAIN
CVS Tags: pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2
Changes since 1.13: +7 -2 lines
Diff to previous 1.13 (colored)

Just replace what we need.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Apr 19 13:14:28 2011 UTC (8 years ago) by roy
Branch: MAIN
Changes since 1.12: +8 -6 lines
Diff to previous 1.12 (colored)

Use python correctly.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jul 30 10:36:30 2010 UTC (8 years, 8 months ago) by asau
Branch: MAIN
CVS Tags: pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

"fortran" -> "fortran77" except where it is clear that it isn't F77.
"fortran" is alias of "fortran77" for now, but it will change later.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Apr 24 17:13:55 2010 UTC (9 years ago) by gls
Branch: MAIN
CVS Tags: pkgsrc-2010Q2-base, pkgsrc-2010Q2
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Update to 1.4.1.
From Wen Heping in PR pkg/43204.

This minor release removes datetime support, which fixes the binary
incompatibility issues with SciPy and other packages. It also includes several
bug fixes. No new features are introduced.

Bugs fixed
- #1336: Fix for 1299 exposes Bus error on Sparc
- #1379: CPU ID not set correctly on PARISC
- #1388: frombuffer calls PyErr_Format without throwing an error
- log1p
- kaiser for M=1
- paver execution on Windows 7 for Python 2.6
- several fixes to Chebyshev and Polynomial

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jan 30 16:27:59 2010 UTC (9 years, 2 months ago) by heinz
Branch: MAIN
CVS Tags: pkgsrc-2010Q1-base, pkgsrc-2010Q1
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

Added LICENSE information.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jan 27 20:48:20 2010 UTC (9 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.8: +7 -4 lines
Diff to previous 1.8 (colored)

update to 1.4.0
- Faster import time
- Extended array wrapping mechanism for ufuncs
- New Neighborhood iterator (C-level only)
- C99-like complex functions in npymath, and a lot of portability
  fixes for basic floating point math functions

Revision 1.8 / (download) - annotate - [select for diffs], Fri Dec 4 21:23:22 2009 UTC (9 years, 4 months ago) by markd
Branch: MAIN
CVS Tags: pkgsrc-2009Q4-base, pkgsrc-2009Q4
Changes since 1.7: +6 -2 lines
Diff to previous 1.7 (colored)

Fix so works again with non-default values of PKGSRC_FORTRAN.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Dec 3 13:06:55 2009 UTC (9 years, 4 months ago) by asau
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Follow f2c/libf2c split: bump revision of all packages
that list Fortran in used languages.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Oct 24 14:22:49 2009 UTC (9 years, 6 months ago) by ahoka
Branch: MAIN
Changes since 1.5: +8 -1 lines
Diff to previous 1.5 (colored)

Avoid picking up other fortran compilers when they are installed.
Fixes build when lang/g95 is present on the system.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Sep 10 19:03:26 2009 UTC (9 years, 7 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2009Q3-base, pkgsrc-2009Q3
Changes since 1.4: +9 -1 lines
Diff to previous 1.4 (colored)


Revision 1.4 / (download) - annotate - [select for diffs], Sat Jul 25 12:08:26 2009 UTC (9 years, 9 months ago) by markd
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Update numpy to 1.3.0

This minor includes numerous bug fixes, official python 2.6 support, and
several new features such as generalized ufuncs.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jun 26 19:47:14 2009 UTC (9 years, 10 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2009Q2-base, pkgsrc-2009Q2
Changes since 1.2: +1 -2 lines
Diff to previous 1.2 (colored)

Allow Python 2.6 to fix dependencies of a number of other packages.
Seems to build fine.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Dec 19 22:09:55 2008 UTC (10 years, 4 months ago) by markd
Branch: MAIN
CVS Tags: pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored)

user-destdir support.

Revision / (download) - annotate - [select for diffs] (vendor branch), Fri Dec 19 22:04:36 2008 UTC (10 years, 4 months ago) by markd
Branch: TNF
CVS Tags: pkgsrc-base
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

Initial import of py-numpy 1.1.0

NumPy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays.  NumPy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type.

There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.

Pkgsrc issue: if the package build happens to find a fortran it prefers
over the one pkgsrc is using it will try to use it and the wrong thing
will happen.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Dec 19 22:04:36 2008 UTC (10 years, 4 months ago) by markd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

CVSweb <>