-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create
SupportsRealImagAsMethod
, real
, and imag
Now ``sympy.core.numbers`` primitives are adequately supported (excepting general false positives; see #5). Fixes #4. Also renames ``SupportsNumeratorDenominatorProperties`` to ``SupportsNumeratorDenominator`` for consistency.
- Loading branch information
Showing
26 changed files
with
490 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
all : \ | ||
perf_rational_baseline.txt \ | ||
perf_rational_big_protocol.txt \ | ||
perf_rational_protocol.txt \ | ||
perf_supports_complex.txt | ||
|
||
perf_%.txt : perf_%.ipy Makefile ../numerary/types.py | ||
ipython >perf_$*.txt --no-banner --quick --LoggingMagics.quiet=True perf_$*.ipy | ||
|
||
../numerary-encumbered.svg : Makefile | ||
curl --output $@ 'https://img.shields.io/badge/%F0%9F%98%A3-%F0%9D%9A%97%F0%9D%9A%9E%F0%9D%9A%96%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%8A%F0%9D%9A%9B%F0%9D%9A%A2--encumbered-yellowgreen' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[22;0t]0;IPython: numerary/docs%timeit isinstance(builtins.int(1), Rational) | ||
341 ns ± 5.4 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | ||
%timeit isinstance(fractions.Fraction(2), Rational) | ||
344 ns ± 5.28 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | ||
%timeit isinstance(builtins.float(3.0), Rational) | ||
369 ns ± 8.65 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[22;0t]0;IPython: numerary/docs%timeit isinstance(builtins.int(1), SupportsLotsOfNumberStuff) | ||
149 µs ± 5.76 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) | ||
%timeit isinstance(fractions.Fraction(2), SupportsLotsOfNumberStuff) | ||
152 µs ± 2.22 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) | ||
%timeit isinstance(builtins.float(3.0), SupportsLotsOfNumberStuff) | ||
149 µs ± 11.1 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[22;0t]0;IPython: numerary/docs%timeit isinstance(builtins.int(1), SupportsNumeratorDenominator) | ||
12.7 µs ± 133 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) | ||
%timeit isinstance(fractions.Fraction(2), SupportsNumeratorDenominator) | ||
12.9 µs ± 158 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) | ||
%timeit isinstance(builtins.float(3.0), SupportsNumeratorDenominator) | ||
13.9 µs ± 1.17 µs per loop (mean ± std. dev. of 7 runs, 100000 loops each) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[22;0t]0;IPython: numerary/docs%timeit isinstance(builtins.int(1), _SupportsComplexOps) | ||
11.9 µs ± 189 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) | ||
%timeit isinstance(builtins.int(1), SupportsComplexOps) | ||
310 ns ± 2.92 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | ||
|
||
%timeit isinstance(builtins.float(2.0), _SupportsComplexOps) | ||
12.4 µs ± 871 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) | ||
%timeit isinstance(builtins.float(2.0), SupportsComplexOps) | ||
313 ns ± 0.829 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | ||
|
||
%timeit isinstance(decimal.Decimal(3), _SupportsComplexOps) | ||
12 µs ± 116 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) | ||
%timeit isinstance(decimal.Decimal(3), SupportsComplexOps) | ||
315 ns ± 2.18 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | ||
|
||
%timeit isinstance(fractions.Fraction(4), _SupportsComplexOps) | ||
12.9 µs ± 1.63 µs per loop (mean ± std. dev. of 7 runs, 100000 loops each) | ||
%timeit isinstance(fractions.Fraction(4), SupportsComplexOps) | ||
314 ns ± 3.1 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | ||
|
||
%timeit isinstance(sympy.core.numbers.Integer(5), _SupportsComplexOps) | ||
12.3 µs ± 692 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) | ||
%timeit isinstance(sympy.core.numbers.Integer(5), SupportsComplexOps) | ||
312 ns ± 3.08 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.