summaryrefslogtreecommitdiff
path: root/numpy/polynomial/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: limit the number of decimals in Polynomial representation (#21654)Lev Maximov2022-06-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * limit the number of decimals in Polynomial representation * tests pass * parenthesize exponential notation in polynomials * fixed a long line warning * added polynomial printoptions tests * polynomial printoptions typo fixed * made switch to exp notation in polynomial display more natural * added a test on switching polynomials to exp notation * fixed linter errors/warnings * support for nanstr and infstr printoptions in polynomials * 10^8 threshold for switching to exp notation when displaying polynomials * merged in PR #21696 fixing issue #21695 * made linter happy * made some docstring tests pass * fixed the docs Co-authored-by: Lev Maximov <lev.maximov@gmail.com>
* DOC: Typos found by codespellDimitri Papadopoulos2021-09-211-1/+1
|
* ENH: Add `__all__` to a number of public modulesBas van Beek2021-04-151-3/+13
|
* DOC: Added links to text and tableJoseph Fox-Rabinovitz2021-03-051-18/+17
| | | | I found these convenient to have on hand while reading
* Merge pull request #16167 from rossbar/doc/poly_module_docstringMatti Picus2020-07-141-0/+101
|\ | | | | DOC: Increase guidance and detail of np.polynomial docstring
| * Update numpy/polynomial/__init__.pyRoss Barnowski2020-07-131-1/+1
| | | | | | Co-authored-by: Melissa Weber Mendonça <melissawm@gmail.com>
| * Fixup rst formatting.Ross Barnowski2020-05-061-28/+26
| |
| * Add categorized listing of conv. class attrs/methods.Ross Barnowski2020-05-061-0/+64
| |
| * WIP: Added blurb about conv. classes to poly pkg docstring.Ross Barnowski2020-05-061-0/+39
| | | | | | | | Emphasize that the class-based interface is preferred.
* | ENH: Improved __str__, __format__ for polynomialsRoss Barnowski2020-05-071-0/+50
|/ | | | | | | | | | | | | | | | | | | | | | | | Changes the printing style of instances of the convenience classes in the polynomial package to a more "human-readable" format. __str__ has been modified and __format__ added to ABCPolyBase, modifying the string representation of polynomial instances, e.g. when printed. __repr__ and the _repr_latex method (which is used in the Jupyter environment are unchanged. Two print formats have been added: 'unicode' and 'ascii'. 'unicode' is the default mode on *nix systems, and uses unicode values for numeric subscripts and superscripts in the polynomial expression. The 'ascii' format is the default on Windows (due to font considerations) and uses Python-style syntax to represent powers, e.g. x**2. The default printing style can be controlled at the package-level with the set_default_printstyle function. The ABCPolyBase.__str__ has also been made to respect the linewidth printoption. Other parameters from the printoptions dictionary are not used. Co-Authored-By: Warren Weckesser <warren.weckesser@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* 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: Move pytesttester outside of np.testing, to avoid creating ↵Eric Wieser2018-07-021-1/+1
| | | | | | | | unnecessary import dependencies pytesttester is used by every single subpackage, so making it depend on np.testing just creates cyclic dependencies that can lead to circular imports Relates to #11457
* TST: Update modules `test` to PytestTester.Charles Harris2018-04-041-2/+3
| | | | | | | | Numpy can now be tested using the standard `python -c"import numpy; numpy.test()"` construct.
* MAINT: Remove "bench" from testing modules `__init__`s.Charles Harris2018-03-311-1/+0
| | | | | The "bench" testing with the old bench files is no longer supported. These days we use `runtests.py` and `asv`.
* MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-041-1/+1
| | | | | | | | | | | | | | | | | The aim here is to separate out the nose dependent files prior to adding pytest support. This could be done by adding new files to the general numpy/testing directory, but I felt that it was to have the relevant files separated out as it makes it easier to completely remove nose dependencies when needed. Many places were accessing submodules in numpy/testing directly, and in some cases incorrectly. That presented a backwards compatibility problem. The solution adapted here is to have "dummy" files whose contents will depend on whether of not pytest is active. That way the module looks the same as before from the outside. In the case of numpy itself, direct accesses have been fixed. Having proper `__all__` lists in the submodules helped in that.
* [TST] Refactor new raise_warnings logic for subpackage test suitesNathaniel J. Smith2015-12-301-3/+3
|
* MAINT: Remove unused variables and imports in numpy/polynomial/*.py.Charles Harris2014-07-291-2/+0
| | | | Detected by pyflakes.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | 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-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* REM: Remove deprecated imports from polynomial package.Charles Harris2012-01-091-290/+0
|
* ENH: Add the polynomial module to the documentation.Charles Harris2011-06-201-4/+7
| | | | | | | | | | | Also: 1. Note that the polynomial package is preferred over poly1d. 2. Remove deprecation of mapparms in __init__.py as it interferes with the documention of the method of the same name. This is probably safe as it is unlikely to be used yet. 3. Make some improvements to the documentation in polytemplate.
* DEP: Deprecate direct import of implementation functions.Charles Harris2011-03-151-4/+292
|
* ENH: Import Hermite, HermiteE, and Laguerre into package namespace.Charles Harris2011-03-131-0/+3
|
* ENH: Add support for Legendre polynomials.Charles Harris2010-08-171-0/+1
|
* more docstring updates from pydoc website (thanks to everyone who contributed!)Jarrod Millman2010-02-171-0/+15
|
* Add support for chebyshev series and polynomials.Charles Harris2009-11-141-0/+7
New modules chebyshev and polynomial are added. The new polynomial module is not compatible with the current polynomial support in numpy, but is much like the new chebyshev module. The most noticeable difference to most will be that coefficients are specified from low to high power, that the low level functions do *not* accept the Chebyshev and Polynomial classes as arguements, and that the Chebyshev and Polynomial classes include a domain. Mapping between domains is a linear substitution and the two classes can be converted one to the other, allowing, for instance, a Chebyshev series in one domain to be expanded as a polynomial in another domain. The new modules are not automatically imported into the numpy namespace, they must be explicitly brought in with a "import numpy.polynomial" statement.