summaryrefslogtreecommitdiff
path: root/math
AgeCommit message (Collapse)AuthorFilesLines
2017-04-29Update to 1.34wen2-8/+7
Upstream changes: 1.34 2017-04-07 - Don't pack .*~ temporary files. - Add MANIFEST.SKIP . 1.33 2017-04-07 - Hopefully fix the tests with "." gone from @INC : - http://www.cpantesters.org/cpan/report/873193f8-15df-11e7-a7e6-820fe85ef7bd - Thanks to DCOLLINS for the report.
2017-04-28Update R-XML to 3.98-1.6.alnsn2-7/+7
No functional change since the previous release 3.98-1.5.
2017-04-23Fix build problem on NetBSD 6.1_STABLE.taca3-3/+23
* Guard use of rl_catch_signals variable with "#if HAVE_RL_CATCH_SIGNALS". Add comment in patch/patch-aa quote from last commit message.
2017-04-22Revbump after icu updateadam2-4/+4
2017-04-22v1.8.0adam5-128/+27
- Fixed bugs in numeral systems. - Fixed bugs related to infinity (Inf). - Fixed bugs related to Not a Number (NaN). - Updated and cleanup documentation. - Cleaned up code structure. - OpenLibm support.
2017-04-21Pull in required dependencies.jperkin1-1/+4
2017-04-14Build UTIL part as well. Bump revision.joerg2-5/+8
2017-04-13Update to FriCAS 1.3.1asau3-122/+110
Detailed changes are not known and not clear (besides regular cleanup).
2017-04-13Handle MACHINE_GNU_PLATFORM when generating PLIST.asau1-1/+3
2017-03-24Check the version number part of the matched string and not the wholejoerg3-6/+6
string, otherwise the result is somewhat random. Bump revision again.
2017-03-24Restore basic g95 support. Bump revision.joerg3-10/+14
2017-03-23Extend SHA512 checksums to various files I have on my local distfilejoerg17-17/+34
mirror.
2017-03-20Updated py-numpy to 1.12.1.wiz3-8/+10
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.
2017-03-20Update ruby-spreadsheet to 1.1.4.taca2-8/+8
* Fix license information in gemspec.
2017-03-20Update ruby-gsl to 2.1.0.2.taca3-67/+73
2.1.0.2 - Enhancements * Support for assigning Ruby Complex types to GSL::Matrix::Complex. (@v0dro) * Support for 2D interpolation by exposing GSLs interp2d and spline2d. (@v0dro) * Support for Ruby 2.4. (@badlamer) - Fixes * Fix NArray superclass mismatch problem. (@v0dro)
2017-03-20Updated nickle to 2.79.wiz3-12/+11
Ensure data cache value array is aligned adequately Data caches are used to store pointers and other potentially long values. Make sure that the position of the values portion of the cache is aligned to a suitable address. Fixes a bus error on sparc64 machines. Building nickle on arm64 now, change package names built .deb and .rpm files are now amd64 instead of i386 Update to version 2.78 Also depend on bison and flex newer version of flex doesn't have yyunput This line was just removing a warning about yyunput unused; newer versions of flex don't even have that symbol anymore. Better to have a warning than fail to compile. Adapt tests to new automake requirements Automake now has a separate variable for the program to run the test scripts with, and breaks if you try to embed that in the TESTS_ENVIRONMENT variable, which used to be how this was done. Use 'G' format for elements when printing arrays in 'g' format This restricts array printing to just recurse one level. When using pointer as hash, first cast to intptr_t This avoids a compiler warning when pointers are not the same size as HashValues. Initialize 'replace' in NewTypedBox When left uninitialized, undefined results will occur. This caused a test failure on MIPS when being built with PIE support. Debian bug 857840. Reported-by: James Cowgill <jcowgill@debian.org> Open quote character is a single char, not a string When checking to see if a string needs to be dequoted, check the first character of the string against the quote character, rather than checking the whole string. Probably using strings for the quote markers wasn't the best API choice as this would have been caught by typechecking had the quote characters been an int instead. Define release date in configure.ac and use that instead of build date This avoids encoding the current date into the resulting output so that it can be reproduced. Add JSON input/output code Reverse data written in linked FileChains FileChains are linked in newest-in order, so they need to be written last-first. Add is_hash primitive Checks whether a value is a hash Abort karatsuba multiply in more places removed gratuitous -O2 from Makefile.am to let CFLAGS handle it Added a lightly-optimized choose(n, k) function to math.5c. The lack of a choose operator has continually bugged me; I've constantly rewritten it "the bad way". This is a lightly optimized version of that function that seems to handle most edge cases reasonably. It has only been tested a little bit. added check mode to sudoku solver cleaned up a bunch of sudoku solver stuff added edge cache to sudoku example tutorial: Close a couple of SGML tags nsgmls found a couple of unclosed tags which may make some versions of docbook tools unhappy. Fix release docs to use git log instead of git-log git-log disappeared a long time ago actually added Sudoku example added Sudoku generator example added sudoku example
2017-03-15octave: amend wrapper patches to be netbsd-specific. fix sunOS buildmaya3-11/+19
octave is using gnulib for portability, but has an additional wrapper around it. unfortunately that means that this type signature is no longer portable. netbsd doesn't have struct tm_zone, others do. I failed to use gnulib to provide struct tm_zone, using an OS-specific macro as an ugly hack. reported by hans
2017-03-13SciPy 0.19.0 is the culmination of 7 months of hard work. It containsadam3-331/+81
many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Moreover, our development attention will now shift to bug-fix releases on the 0.19.x branch, and on adding new features on the master branch.
2017-03-11Update to 1.7.14wen2-7/+7
Upstream changes: Changes in Version 1.7-14 o Several convenience interfaces to read.zoo() have been added: read.table.zoo(), read.csv.zoo(), read.csv2.zoo(), read.delim.zoo(), read.delim2.zoo(). All of these first call the corresponding read.*() function to read the data from a text file (with the respective default settings) and subsequently call read.zoo() to turn the data into a zoo series. o na.approx.default() did not properly process the "maxgap" argument if y did not contain any NAs but NAs were only created implicitly by xout being different from x (pointed out by Stefan Metzger). A suitable fix has been added that merges x and xout first. o aggregate.zoo() and rollapply.zoo() gained the argument coredata=TRUE which can control whether only the coredata is passed to each subset (previous behavior) or the full zoo series. o The "its" package has been archived on CRAN and hence removed from the list of zoo's suggested packages. However, various methods for objects of class "its" continue to be available in zoo in case someone still uses the legacy code.
2017-03-11Update to 3.3.3wen3-9/+11
Upstream changes: CHANGES IN R 3.3.3 NEW FEATURES Changes when redirection of a http:// URL to a https:// URL is encountered: The internal methods of download.file() and url() now report that they cannot follow this (rather than failing silently). (Unix-alike) download.file(method = "auto") (the default) re-tries with method = "libcurl". (Unix-alike) url(method = "default") with an explicit open argument re-tries with method = "libcurl". This covers many of the usages, e.g. readLines() with a URL argument. INSTALLATION on a UNIX-ALIKE The configure check for the zlib version is now robust to versions longer than 5 characters, including 1.2.11. UTILITIES Environmental variable _R_CHECK_TESTS_NLINES_ controls how R CMD check reports failing tests (see §8 of the ‘R Internals’ manual). DEPRECATED AND DEFUNCT (C-level Native routine registration.) The undocumented styles field of the components of R_CMethodDef and R_FortranMethodDef is deprecated. BUG FIXES vapply(x, *) now works with long vectors x. (PR#17174) isS3method("is.na.data.frame") and similar are correct now. (PR#17171) grepRaw(<long>, <short>, fixed = TRUE) now works, thanks to a patch by Mikko Korpela. (PR#17132) Package installation into a library where the package exists via symbolic link now should work wherever Sys.readlink() works, resolving PR#16725. "Cincinnati" was missing an "n" in the precip dataset. Fix buffer overflow vulnerability in pdf() when loading an encoding file. Reported by Talos (TALOS-2016-0227). getDLLRegisteredRoutines() now produces its warning correctly when multiple DLLs match, thanks to Matt Dowle's PR#17184. Sys.timezone() now returns non-NA also on platforms such as Ubuntu 14.04.5 LTS, thanks to Mikko Korpela's PR#17186. format(x) for an illegal "POSIXlt" object x no longer segfaults. methods(f) now also works for f "(" or "{". (Windows only) dir.create() did not check the length of the path to create, and so could overflow a buffer and crash R. (PR#17206) On some systems, very small hexadecimal numbers in hex notation would underflow to zero. (PR#17199) pmin() and pmax() now work again for ordered factors and 0-length S3 classed objects, thanks to Suharto Anggono's PR#17195 and PR#17200. bug.report() did not do any validity checking on a package's BugReports field. It now ignores an empty field, removes leading whitespace and only attempts to open http:// and https:// URLs, falling back to emailing the maintainer. Bandwidth selectors bw.ucv() and bw.SJ() gave incorrect answers or incorrectly reported an error (because of integer overflow) for inputs longer than 46341. Similarly for bw.bcv() at length 5793. Another possible integer overflow is checked and may result in an error report (rather than an incorrect result) for much longer inputs (millions for a smooth distribution). findMethod() failed if the active signature had expanded beyond what a particular package used. (Example with packages XR and XRJulia on CRAN.) qbeta() underflowed too early in some very asymmetric cases. (PR#17178) R CMD Rd2pdf had problems with packages with non-ASCII titles in ‘.Rd’ files (usually the titles were omitted).
2017-03-04Update to 0.70wen2-7/+7
Upstream changes: 0.70 - 02 Mar 2017, H.Merijn Brand * Add label functionality to ::Sheet * Add ->column and ->cellcolumn for ::Sheet * Add col2label sub/method * Sanitize xls2csv export filenames * Fix sorting in xlscat for un-aligned columns * It's 2017 * Be overly verbose about maxrow and maxcol being 1-based (RT#120476)
2017-02-28Recursive revbump from graphics/libwebpryoon1-2/+2
2017-02-28Fix C++ syntax.joerg3-1/+29
2017-02-27Updated libixion to 0.12.2.wiz2-8/+7
Up the version to 0.12.2. Update the CHANGELOG. Fix lexer tokenizer to get R1C1 addresses properly parsed. For now, a lexer name that contains a '[' and ']' pair can have any characters in-between, in order to have e.g. 'R[-5]C' properly parsed as a name. Fix a range address parsing error. It previously failed to parse 'R[-5]C:R[-1]C'. Add a test case that ixion currently fails to parse. Export these hash::operator(...) symbols. add CI config
2017-02-20Switch py-dateutils to plain DEPENDS.wiz1-4/+2
It supports both python 2 and 3 nowadays.
2017-02-20Newer versions of Teapot appear to expect a wide char capable ncurses.hauke1-4/+4
While here, drop maintainership - I haven't used the thing in years, and definitely not since its conversion to a CMake build (of which I know nothing).
2017-02-17Replacement operators must not be declared inline. Bump revision.joerg4-2/+113
2017-02-17Update herisvm to 0.8.0cheusov2-6/+7
2017-02-14Pointers are not ordered relative to 0, so compare the elementsjoerg3-5/+17
as likely intended. Bump revision.
2017-02-12Recursive revbump from fonts/harfbuzzryoon19-38/+38
2017-02-11Updated math/p5-Math-BaseCnv 1.8 to 1.14mef2-9/+8
----------------------------------------- - 1.14 G7UM6iSk Sat Jul 30 06:44:28:46 -0500 2016 * synchronized README and Changes to updated POD - 1.12 G7OMKBCn Sun Jul 24 20:11:12:49 -0500 2016 * added digit set 'b96' as a reordering of 'asc' - 1.10 G7OMF3ZT Sun Jul 24 15:03:35:29 -0500 2016 * added new digit sets from Math::Base::Convert * switched all old hex() to distinct new heX() and updated POD to reflect * fixed META license to match POD and resolve issue: <HTTPS://RT.CPAN.Org/Public/Bug/Display.html?id=60122> (Thanks again xenoterracide.) * removed PT from VERSION to resolve issue: <HTTPS://RT.CPAN.Org/Public/Bug/Display.html?id=60275> (Thanks Alexandr.)
2017-02-11Updated math/p5-Spreadsheet-Read 0.66 to 0.69mef2-7/+7
---------------------------------------- 0.69 - 02 Dec 2016, H.Merijn Brand * Several OO fixes, more tests, more docs 0.68 - 29 Nov 2016, H.Merijn Brand * List non-core modules/version used on very verbose in xlscat * Option to export all sheets in a spreadsheet to CSV (UTF-8 only) * Add OO interface * Feature: add new spreadsheets to existing book (even of different types) 0.67 - 17 Jun 2016, H.Merijn Brand * CPANTESTERS showed that some versions really messed op numeric/percentage
2017-02-11Updated math/p5-Math-MatrixReal to 2.13mef2-8/+7
--------------------------------------- Changes in v2.13 - Jonathan "Duke" Leto September 2015 -------------------------- * Fix bug where as_list() did not work correctly for non-square matrices. Reported by Elia Liitiäinen in RT #116968
2017-02-11Updated math/p5-Math-GMP 2.11 to 2.14mef2-8/+7
------------------------------------- 2.14 2017-02-01 Shlomif - Hopefully fix the GPG signature. - https://rt.cpan.org/Ticket/Display.html?id=120062 - Thanks to Pavel Mateja for the report. 2.13 2016-11-18 Shlomif - Fix the tests on older libgmps. - See https://rt.cpan.org/Ticket/Display.html?id=118816 - Thanks to Hugo van der Sanden for the patches. - Refactoring of the test suite. 2.12 2016-11-09 Shlomif - Add support for testing methods that return lists. - Add broot, brootrem, bsqrtrem, is_perfect_power, is_perfect_square - Thanks to Hugo van der Sanden for the patches - https://rt.cpan.org/Ticket/Display.html?id=118677
2017-02-11Updated math/p5-Math-BigInt-GMP to 1.6004mef2-7/+7
----------------------------------------- 2017-02-05 v1.6004 pjacklam * Fix typos in POD. * Update link in SUPPORT section. * Minor improvements to the documentation (POD).
2017-02-11Updated math/p5-Math-BigInt to 1.999809mef2-7/+7
--------------------------------------- 2017-02-10 v1.999809 pjacklam * When a new method is added to Math::BigInt or Math::BigFloat, and this new method requires a new backend library method, die with a suitable error message if the installed backend library does not support this new method. The error message says that the method requires a newer version of the backend library. * Fix typos in Math::BigFloat and Math::BigInt. * Add bfib() and blucas() to Math::BigInt. They return Fibonacci and Lucas numbers, respectively. The actual computation of the numbers is done by the backend library. Documented both methods in POD. Add test files bfib-mbi.t and blucas-mbi.t. * Add _fib() and _lucas() to Math::BigInt::Lib. They return Fibonacci and Lucas numbers, respectively. Document both methods in POD. Add test files author-lib-arithmetic-unary-_fib.t and author-lib-arithmetic-unary-_lucas.t.
2017-02-10Updated math/R-quantreg 5.21 to 5.29mef2-7/+7
------------------------------------- From: https://cran.r-project.org/web/packages/quantreg/ChangeLog 5.21 1. Allowed ... to be passed in plot.summary.crqs. 2. Fixed namespace bug in dynrq, and added an Edgeworth wacky AR(1) example to dynrq.Rd. 3. Fixed rqss bug about length of residual vector 5.23 1. Added a "cluster" option for summary.rq() when using the bootstrap option this option implements the wild gradient bootstrap method of Hagemann (2016). See boot.rq for further details. [Needs further testing.] 2. Added a sfn method for rq models, and in the process modified somewhat the return object for both rq.fit.sfn and rq.fit.sfnc so that it is compatible with other rq.fit objects. 5.24 1. Reverted to the old fortran versions of srqfn.f and srqfnc.f, ie removed Martin Maechler's C versions, in preparation for some new sparse forms of the bootstrapping functions. Made a couple of slight changes in the return object for these functions. 2. Fixed a sihttps://cran.r-project.org/web/packages/quantreg/ChangeLoggn error in the cluster option pointed out in an email of Andreas on May 9 2016. 3. Added jackknife option to boot.rq for the proposal of Portnoy. 4. Adapted boot.rq and friends so that when there are multiple taus summary.rqs reuses the same randomization for each of the taus to facilitate joint inference with the bootstrap realizations. 5.25 1. When method = "sfn" store model$x in sparse form. Then when bootstrapping use method = "sfn" rather than the usual "br" method. 2. When using the "cluster" option for bootstrap allow "sfn" as above. 3. When na.action = "omit" and length(fit$na.action) > 0, then omit these values from the strata indicator "cluster". This would seem to help bring together the survey package and quantreg as desired by email correspondance with donald706. 5.26 1. Fixed long line per Kurt's suggestion. 2. Added some comments about method "sfn" in the man page for rq. 5.27 1. removed lines that cat'd taus from rqprocess in the khmal.R 2. fixed environment problem in nlrq, according to suggestion of Vaidotas Zemlys-Balevicius email August 9 2016. 5.28 1. Cleaned up the fortran source a bit in accordance with Kurt's mandate of late August 2016. There are still some offensive items mainly in crq.f that should be dealt with, but I wasn't able to dig into this at the moment.
2017-02-09Correct the default value of BUILDLINK_DEPMETHOD.arpackminskim2-5/+3
Since arpack installs a dynamic library, its BUILDLINK_DEPMETHOD shouldn't be set to "build" by default. Bump PKGREVISION of octave for its runtime dependency change.
2017-02-06Recursive bump for harfbuzz's new graphite2 dependency.wiz19-38/+38
2017-02-05Set LIBPATH during build, bump pkgrev.bsiegert1-1/+3
Otherwise, the library refers to a nonexistent lib in /usr/lib on Darwin.
2017-02-03vowpal_wabbit: add zlib to dependenciescheusov1-2/+3
2017-01-30+ amathleot1-1/+2
2017-01-30Import amath-1.6.2 as math/amathleot4-0/+37
Features a case sensitive command line interface, internal IEEE 754 calculations with 15 significant digits, calculations with real and complex numbers, variables and user defined functions, logarithmic and exponential functions, trigonometric and hyperbolic function and selected mathematical constants and rounding functions. Packaged by Carsten Larsen via PR pkg/51922
2017-01-25SciPy 0.18.1 is a bug-fix release with no new features compared to 0.18.0.adam2-7/+7
2017-01-25Changes 3.7.0:adam5-77/+86
* Linear Least Squares / Minimum Norm solution * Symmetric-indefinite Factorization: Aasen’s tridiagonalization * Symmetric-indefinite Factorization: New storage format for L factor in Rook Pivoting and Bunch Kaufman of LDLT * Symmetric eigenvalue problem: Two-stage algorithm for reduction to tridiagonal form * Improved Complex Jacobi SVD * LAPACKE interfaces
2017-01-25GLPK 4.61 (42:0:2) has been released.adam3-28/+27
The following modules were renamed to simplify maintenance. * src/prob.h RENAMED -> src/api/prob.h * src/glpapi01.c RENAMED -> src/api/prob1.c * src/glpapi02.c RENAMED -> src/api/prob2.c * src/glpapi03.c RENAMED -> src/api/prob3.c * src/glpapi04.c RENAMED -> src/api/prob4.c * src/glpapi05.c RENAMED -> src/api/prob5.c * src/env/tls.c TLS (thread local storage class specifier) option was added; see comments in tls.c for details. * configure.ac, config.h.in Test for TLS was added. * src/env/tls.c Dll support was added. The following modules were changed to add __cdecl specifier for functions passed to qsort (this is needed only on compiling GLPK with MSVC to run under MS Windows). * src/api/cpxbas.c * src/cglib/cfg1.c * src/cglib/gmigen.c * src/cglib/mirgen.c * src/misc/wclique1.c * src/simplex/spychuzc.c * src/glpios10.c * src/glpios11.c * examples/glpsol.c * src/glpk.h, src/env/env.c The API routine glp_version was changed to avoid initialization of the GLPK environment. The new API routine glp_config was added (but not documented yet). * INSTALL Description of the configure option '--with-zlib' was removed.
2017-01-24Mention you can use ~/.octaverc to make the change more permanent, it'smaya1-3/+4
more convenient.
2017-01-22Match upstream version more closely.wiz1-2/+2
2017-01-22Updated fftwf to 3.3.6pl1.wiz2-8/+8
FFTW 3.3.6-pl1: * Bugfix: FFTW 3.3.6 had the wrong libtool version number, and generated shared libraries of the form libfftw3.so.2.6.6 instead of libfftw3.so.3.*. FFTW 3.3.6: * The fftw_make_planner_thread_safe() API introduced in 3.3.5 didn't work, and this 3.3.6 fixes it. Sorry about that. * compilation fixes for IBM XLC * compilation fixes for threads on Windows * fix SIMD autodetection on amd64 when (_MSC_VER > 1500)
2017-01-22Updated py-numpy to 1.12.0.wiz7-71/+26
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. Highlights ========== 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. Deprecations ============ 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. 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 before 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 type. 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 method. 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``, ``nanstd`` ``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 settings. ``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. C API ----- 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/__init__.py`` 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/__init__.py`` to import a ``numpy/_distributor_init.py`` 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 precision. 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 complex. ``pathlib.Path`` objects now supported -------------------------------------- The standard ``np.load``, ``np.save``, ``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 attribute. 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 details. 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. Improvements ============ ``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 one. 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(‘ij,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 ``np.dot(a, 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 desireable. Changes ======= All array-like methods are now called with keyword arguments in fromnumeric.py ------------------------------------------------------------------------------ Internally, many array-like methods in fromnumeric.py 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.