Python numpy.longcomplex() Examples
The following are 28
code examples of numpy.longcomplex().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
numpy
, or try the search function
.
Example #1
Source File: test_umath.py From pySINDy with MIT License | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #2
Source File: test_umath.py From keras-lambda with MIT License | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #3
Source File: test_umath.py From keras-lambda with MIT License | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #4
Source File: test_umath.py From twitter-stock-recommendation with MIT License | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #5
Source File: test_umath.py From twitter-stock-recommendation with MIT License | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #6
Source File: test_umath.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #7
Source File: test_umath.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #8
Source File: test_umath.py From elasticintel with GNU General Public License v3.0 | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #9
Source File: test_umath.py From elasticintel with GNU General Public License v3.0 | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #10
Source File: test_umath.py From ImageFusion with MIT License | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #11
Source File: test_umath.py From ImageFusion with MIT License | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #12
Source File: test_umath.py From mxnet-lambda with Apache License 2.0 | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #13
Source File: test_umath.py From mxnet-lambda with Apache License 2.0 | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #14
Source File: test_umath.py From pySINDy with MIT License | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #15
Source File: test_umath.py From auto-alt-text-lambda-api with MIT License | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #16
Source File: test_blas.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def test_get_blas_funcs(): # check that it returns Fortran code for arrays that are # fortran-ordered f1, f2, f3 = get_blas_funcs( ('axpy', 'axpy', 'axpy'), (np.empty((2, 2), dtype=np.complex64, order='F'), np.empty((2, 2), dtype=np.complex128, order='C')) ) # get_blas_funcs will choose libraries depending on most generic # array assert_equal(f1.typecode, 'z') assert_equal(f2.typecode, 'z') if cblas is not None: assert_equal(f1.module_name, 'cblas') assert_equal(f2.module_name, 'cblas') # check defaults. f1 = get_blas_funcs('rotg') assert_equal(f1.typecode, 'd') # check also dtype interface f1 = get_blas_funcs('gemm', dtype=np.complex64) assert_equal(f1.typecode, 'c') f1 = get_blas_funcs('gemm', dtype='F') assert_equal(f1.typecode, 'c') # extended precision complex f1 = get_blas_funcs('gemm', dtype=np.longcomplex) assert_equal(f1.typecode, 'z') # check safe complex upcasting f1 = get_blas_funcs('axpy', (np.empty((2, 2), dtype=np.float64), np.empty((2, 2), dtype=np.complex64)) ) assert_equal(f1.typecode, 'z')
Example #17
Source File: test_basic.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def test_real(self): if np.dtype(np.longdouble).itemsize == np.dtype(np.double).itemsize: # longdouble == double; so fft is supported return x = np.random.randn(10).astype(np.longcomplex) for f in [fft, ifft]: try: f(x) raise AssertionError("Type %r not supported but does not fail" % np.longcomplex) except ValueError: pass
Example #18
Source File: test_basic.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def test_complex(self): if np.dtype(np.longcomplex).itemsize == np.dtype(complex).itemsize: # longdouble == double; so fft is supported return x = np.random.randn(10).astype(np.longdouble) + \ 1j * np.random.randn(10).astype(np.longdouble) for f in [fft, ifft]: try: f(x) raise AssertionError("Type %r not supported but does not fail" % np.longcomplex) except ValueError: pass
Example #19
Source File: test_umath.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #20
Source File: test_umath.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #21
Source File: test_blas.py From Computable with MIT License | 5 votes |
def test_get_blas_funcs(): # check that it returns Fortran code for arrays that are # fortran-ordered f1, f2, f3 = get_blas_funcs( ('axpy', 'axpy', 'axpy'), (np.empty((2,2), dtype=np.complex64, order='F'), np.empty((2,2), dtype=np.complex128, order='C')) ) # get_blas_funcs will choose libraries depending on most generic # array assert_equal(f1.typecode, 'z') assert_equal(f2.typecode, 'z') if cblas is not None: assert_equal(f1.module_name, 'cblas') assert_equal(f2.module_name, 'cblas') # check defaults. f1 = get_blas_funcs('rotg') assert_equal(f1.typecode, 'd') # check also dtype interface f1 = get_blas_funcs('gemm', dtype=np.complex64) assert_equal(f1.typecode, 'c') f1 = get_blas_funcs('gemm', dtype='F') assert_equal(f1.typecode, 'c') # extended precision complex f1 = get_blas_funcs('gemm', dtype=np.longcomplex) assert_equal(f1.typecode, 'z') # check safe complex upcasting f1 = get_blas_funcs('axpy', (np.empty((2,2), dtype=np.float64), np.empty((2,2), dtype=np.complex64)) ) assert_equal(f1.typecode, 'z')
Example #22
Source File: test_basic.py From Computable with MIT License | 5 votes |
def test_real(self): if np.dtype(np.longdouble).itemsize == np.dtype(np.double).itemsize: # longdouble == double; so fft is supported return x = np.random.randn(10).astype(np.longcomplex) for f in [fft, ifft]: try: f(x) raise AssertionError("Type %r not supported but does not fail" % np.longcomplex) except ValueError: pass
Example #23
Source File: test_basic.py From Computable with MIT License | 5 votes |
def test_complex(self): if np.dtype(np.longcomplex).itemsize == np.dtype(np.complex).itemsize: # longdouble == double; so fft is supported return x = np.random.randn(10).astype(np.longdouble) + \ 1j * np.random.randn(10).astype(np.longdouble) for f in [fft, ifft]: try: f(x) raise AssertionError("Type %r not supported but does not fail" % np.longcomplex) except ValueError: pass
Example #24
Source File: test_umath.py From Computable with MIT License | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #25
Source File: test_umath.py From Computable with MIT License | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #26
Source File: test_umath.py From vnpy_crypto with MIT License | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)
Example #27
Source File: test_umath.py From vnpy_crypto with MIT License | 5 votes |
def is_longdouble_finfo_bogus(): info = np.finfo(np.longcomplex) return not np.isfinite(np.log10(info.tiny/info.eps))
Example #28
Source File: test_umath.py From auto-alt-text-lambda-api with MIT License | 5 votes |
def test_loss_of_precision_longcomplex(self): self.check_loss_of_precision(np.longcomplex)