summaryrefslogtreecommitdiff
path: root/numpy/lib/user_array.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #15867 from eric-wieser/deprecate-tostringMatti Picus2020-04-011-0/+4
|\ | | | | DEP: Deprecate ndarray.tostring()
| * DEP: Deprecate ndarray.tostring()Eric Wieser2020-03-301-0/+4
| | | | | | | | The corresponding `array.array.tostring()` in the standard library has been deprecated in favor of `tobytes` since Python 3.1 (python/cpython@1ce3eb5c5b4830e69b21865e2d723e22749544e0).
* | MAINT: simplify code that assumes str/unicode and int/long are different ↵Eric Wieser2020-03-261-4/+0
|/ | | | | types (#15816) Cleanup from the dropping of python 2
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-1/+1
| | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* MAINT: replace len(x.shape) with x.ndimEric Wieser2017-02-241-2/+2
|
* MAINT: Remove __setslice__ and __getslice__Eric Wieser2017-02-091-6/+0
| | | | | This code was only here for Python 2.5 compatibility, but numpy requires 2.7 at minimum
* DOC,BUG: Fix some latex generation problems.Charles Harris2016-01-051-0/+17
| | | | | | | | | | | | Some of the documentation for newbyteorder, copy and pasted in several spots, had paragraphs ending in `::`, initiating a sphinx generated Verbatim environment and resulting in "LaTeX Error: Too deeply nested". The user_array.container class needed non-empty class documentation. That that caused a problem is probably a numpydoc bug, but it is easy to fix. [skip ci]
* STY: Make files in numpy/lib PEP8 compliant.Charles Harris2014-07-311-40/+99
| | | | The rules enforced are the same as those used for scipy.
* MAINT: Fixes for problems in numpy/lib revealed by pyflakes.Charles Harris2014-07-311-4/+0
| | | | | | Some of those problems look like potential coding errors. In those cases a Fixme comment was made and the offending code, usually an unused variable, was commented out.
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-33/+33
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* STY: Giant whitespace cleanup.Charles Harris2013-08-181-1/+1
| | | | Now is as good a time as any with open PR's at a low.
* 2to3: Apply the `numliterals` fixer and skip the `long` fixer.Charles Harris2013-04-131-4/+7
| | | | | | | | | | | | | | | | | | | The numliterals fixer replaces the old style octal number like '01' by '0o1' removes the 'L' suffix. Octal values were previously mistakenly specified in some dates, those uses have been corrected by removing the leading zeros. Simply Removing the 'L' suffix should not be a problem, but in some testing code it looks neccesary, so in those places the Python long constructor is used instead. The 'long' type is no longer defined in Python 3. Because we need to have it defined for Python 2 it is added to numpy/compat/np3k.py where it is defined as 'int' for Python 3 and 'long' for Python 2. The `long` fixer then needs to be skipped so that it doesn't undo the good work. Closes #3074, #3067.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-10/+10
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Use absolute imports.Charles Harris2013-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+2
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* STY: Update exception style, easy ones.Charles Harris2011-04-051-1/+1
|
* Whitespace cleanup.Stefan van der Walt2007-01-081-1/+1
|
* Many name-changes in oldnumeric. This may break some numpy code that was ↵Travis Oliphant2006-08-041-0/+217
using the oldnumeric interface.