summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorEndolith <endolith@gmail.com>2016-06-17 19:45:24 -0400
committerEndolith <endolith@gmail.com>2016-06-20 23:09:03 -0400
commitc96736198c01861aa8d7ea2b57876648eb999c61 (patch)
treed0dd055de45b94ba8c265484b07dc829b9adc119 /numpy/lib/tests/test_function_base.py
parentd3afd5057ca05ae7d315c68e5009b3ee183860e3 (diff)
downloadnumpy-c96736198c01861aa8d7ea2b57876648eb999c61.tar.gz
ENH: Add geomspace function
Like logspace, but specifying start and stop directly, without having to specify the base. Purely imaginary or purely negative real sequences are converted to positive real, computed, and converted back, so there are no negligible real or imaginary parts. Instead of array([ 6.12323400e-17 +1.00000000e+00j, 6.12323400e-16 +1.00000000e+01j, 6.12323400e-15 +1.00000000e+02j, 6.12323400e-14 +1.00000000e+03j]) it outputs array([ 0. +1.j, 0. +10.j, 0. +100.j, 0.+1000.j]) If dtype is complex it does the math in complex so it can leave the real line and follow a spiral. TST: Added tests for geomspace and more tests for logspace, making PhysicalQuantities tests work for all types of functions PEP8: __all__ after imports, line wrapping
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
0 files changed, 0 insertions, 0 deletions