summaryrefslogtreecommitdiff
path: root/numpy/typing
Commit message (Collapse)AuthorAgeFilesLines
...
* | TST: Fixed the line number offsetBas van Beek2020-10-221-1/+1
| |
* | MAINT: Removed unused importsBas van Beek2020-10-221-4/+0
| |
* | ENH: Add annotations for `__mod__` & `__divmod__`Bas van Beek2020-10-221-1/+123
|/
* TST: Fixed a broken `np.core.numeric` testBas van Beek2020-10-211-2/+2
|
* Merge pull request #17597 from BvB93/testsMatti Picus2020-10-211-5/+42
|\ | | | | TST: Clean up the errors of the typing tests
| * TST: Clean up the errors of the typing testsBas van Beek2020-10-211-5/+42
| |
* | Merge pull request #17564 from BvB93/numericMatti Picus2020-10-215-10/+255
|\ \ | | | | | | MAINT: Update the annotations in `np.core.numeric`
| * | TST: Added tests for `np.core.numeric`Bas van Beek2020-10-144-2/+255
| | |
| * | TST,MAINT: Moved a few tests to `array_constructors`Bas van Beek2020-10-141-8/+0
| | |
* | | Merge pull request #17540 from BvB93/precisionMatti Picus2020-10-2114-469/+622
|\ \ \ | |_|/ |/| | ENH: Make `np.number` generic with respect to its precision
| * | TST: Update the tests introduced in the latest rebaseBas van Beek2020-10-171-10/+10
| | |
| * | MAINT: Removed an unused importBas van Beek2020-10-171-1/+1
| | |
| * | TST: Added a test for the example in the `NBitBase` docstringBas van Beek2020-10-171-0/+18
| | |
| * | TST: Add support for precision to the arithmetic and bitwise ops testsBas van Beek2020-10-172-269/+269
| | |
| * | TST: Update the pre-existing testsBas van Beek2020-10-177-158/+154
| | |
| * | TST: Ignore all `*` characters in the reveal testsBas van Beek2020-10-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Mypy uses a `*` whenever an annotation or one of its parameters is based on a TypeVar. Its added value is neglible and it unnecessarily complicates the `reveal` tests so lets just ignore them. Note that this is done after running mypy, so it won't affect cases where `*` is used as multiplication operator.
| * | MAINT: Fixed a few issues with the `__call__`-based protocolsBas van Beek2020-10-171-38/+34
| | | | | | | | | | | | | | | | | | * Removed redundant `type: ignore` messages * Set the return precision as `Union[_NBit_co, _NBit]` * Type the precision of `builtins.int` operations as `Any`
| * | DOC: Fixed some docstring formattingBas van Beek2020-10-171-18/+20
| | |
| * | MAINT: Removed a now redundant `TODO` commentBas van Beek2020-10-171-3/+0
| | |
| * | ENH: Make `complexfloating` generic w.r.t 2 typevarsBas van Beek2020-10-171-2/+6
| | |
| * | ENH: Added support for `number` precisionBas van Beek2020-10-172-24/+163
| | |
* | | TST: Added new typing testsBas van Beek2020-10-191-0/+3
|/ /
* | Merge pull request #17572 from BvB93/constantsCharles Harris2020-10-162-1/+12
|\ \ | | | | | | ENH: Add annotations for three new constants
| * | TST: Updated the typing testsBas van Beek2020-10-152-1/+12
| | |
* | | Merge pull request #16759 from person142/dtype-genericCharles Harris2020-10-164-17/+57
|\ \ \ | |/ / |/| | ENH: make dtype generic over scalar type
| * | MAINT: add more dtype __new__ overloads for missing scalar typesJosh Wilson2020-10-071-0/+9
| | |
| * | ENH: make dtype generic over scalar typeJosh Wilson2020-10-074-17/+48
| |/ | | | | | | | | This allows representing dtype subclasses via constructs like `np.dtype[np.float64]`.
* | Merge pull request #17479 from person142/np-unicodeCharles Harris2020-10-091-0/+3
|\ \ | | | | | | ENH: type np.unicode_ as np.str_
| * | MAINT: add str0 as an alias of str_ on the typing levelJosh Wilson2020-10-071-0/+1
| | |
| * | ENH: type np.unicode_ as np.str_Josh Wilson2020-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The two are aliases; i.e. >>> np.unicode_ is np.str_ True so make them aliases on the typing level too.
* | | Merge pull request #17465 from BvB93/bitwise-opsCharles Harris2020-10-094-0/+306
|\ \ \ | | | | | | | | ENH: Add annotations for bitwise operations
| * | | REV: Remove the `uint64`/`signedinteger` specific overloadBas van Beek2020-10-062-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | Unfortunately the likes of `self: uint64` don't work with protocols. Revisit this once we add proper support for numerical precision.
| * | | TST: Added tests for bitwise operationsBas van Beek2020-10-053-0/+281
| | | |
| * | | ENH: Add annotations for `generic` and `ndarray` bitwise operationsBas van Beek2020-10-051-1/+28
| |/ /
* | | Merge pull request #17487 from BvB93/duplicateCharles Harris2020-10-081-1/+7
|\ \ \ | |_|/ |/| | MAINT: Remove duplicate placeholder annotations
| * | TST: Updated the module-related testsBas van Beek2020-10-071-1/+7
| |/
* | MAINT: Move aliases for common scalar unions to `numpy.typing` (#17429)Bas van Beek2020-10-074-7/+50
|/ | | * MAINT: Move the `<scalar>Like` unions to `numpy.typing`
* Merge pull request #17372 from BvB93/from-numericCharles Harris2020-10-053-0/+330
|\ | | | | ENH: Add annotations for remaining `ndarray` / `generic` non-magic methods
| * TST: Attempt #2 at fixing the `int`-related failure on 32-bit systemsBas van Beek2020-09-231-31/+31
| |
| * TST: Fixed an `int`-related failure on 32-bit systemsBas van Beek2020-09-231-2/+3
| |
| * TST: Added new `ndarray`/`generic` typing testsBas van Beek2020-09-223-0/+329
| |
* | ENH: Annotate the arithmetic operations of `ndarray` and `generic` (#17273)Bas van Beek2020-10-028-47/+672
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: Added annotations for arithmetic-based magic methods * TST: Added arithmetic tests * TST: Moved a number of tests to `arithmetic.py` * ENH: Ensure that objects annotated as `number` support arithmetic operations * MAINT: Arithmetic operations on 0d arrays return scalars * MAINT: Clarify the type of generics returned by `ufunc.__call__` * TST: Added more arithmetic tests * MAINT: Use `_CharLike` when both `str` and `bytes` are accepted * MAINT: Change the `timedelta64` baseclass to `generic` * MAINT: Add aliases for common scalar unions * MAINT: Update the defition of `_NumberLike` * MAINT: Replace `_NumberLike` with `_ComplexLike` in the `complexfloating` annotations * MAINT: Move the callback protocols to their own module * MAINT: Make `typing._callback` available at runtime * DOC: Provide further clarification about callback protocols * MAINT: Replace `_callback` with `_callable` Addresses https://github.com/numpy/numpy/pull/17273#discussion_r485821346 The use of `__call__`-defining protocols is not limited to callbacks. The module name name & docstring now reflects this. * MAINT: Removed `__add__` from `str_` and `bytes_` Most `np.bytes_` / `np.str_` methods return their builtin `bytes` / `str` counterpart. This includes addition. * MAINT: Fix the return type of boolean division Addresses https://github.com/numpy/numpy/pull/17273#discussion_r486271220 Dividing a `np.bool_` by an integer (or vice versa) always returns `float64` * MAINT: Renamed all `_<x>Arithmetic` protocols to `_<x>Op Addresses https://github.com/numpy/numpy/pull/17273#discussion_r486272745 * TST: Add tests for boolean division * ENH: Make `np.number` generic w.r.t. its precision * ENH,WIP: Add a mypy plugin for casting `np.number` instances to appropiate subclasses * Revert "ENH,WIP: Add a mypy plugin for casting `np.number` instances to appropiate subclasses" This reverts commit c526fb619d20902bfd77709c8983c7a7d5477c95. * Revert "ENH: Make `np.number` generic w.r.t. its precision" This reverts commit dbf20183cf7ff71e379cd1a165d07e1a1d643135. * MAINT: Narow the definition of `_ComplexLike` Addresses https://github.com/numpy/numpy/pull/17273#discussion_r490440238 * MAINT: Refined the return type of `unint + int` ops `unsignedinteger + signedinteger` generally returns a `signedinteger` subclass. The exception to this is `uint64 + signedinteger`, which returns `float64`. Addresses https://github.com/numpy/numpy/pull/17273#discussion_r490442023 * MAINT: Use `_IntLike` and `_FloatLike` in the definition of `_ComplexLike`
* | TST: Consolidate all array construction testsBas van Beek2020-10-018-62/+51
| |
* | TST: Added tests for `np.core._asarray`Bas van Beek2020-10-013-0/+83
| |
* | ENH: Use literals where possibleBas van Beek2020-10-011-0/+2
| |
* | TST: Mark the typing tests as slowBas van Beek2020-10-011-0/+4
| |
* | TST: add test to verify that getting a non-existent objects of top-level ↵Jun Kudo2020-10-011-0/+1
| | | | | | | | indeed results in an error
* | Revert "TST: Add test to verify that getting a non-existent objects indeed ↵Jun Kudo2020-10-011-315/+0
| | | | | | | | | | | | results in an error." This reverts commit 0996962236506342d16730580e126efe2dfbf98d.
* | TST: Add test to verify that getting a non-existent objects indeed results ↵Jun Kudo2020-10-011-0/+315
|/ | | | in an error.
* MAINT: Move typing testsCharles Harris2020-09-0741-0/+1958
| | | | Move them into a new `numpy/typing/tests directory`