How to use the nptyping.Float.type_of function in nptyping

To help you get started, we’ve selected a few nptyping examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ramonhagenaars / nptyping / tests / test_types / test_number.py View on Github external
def test_float_of(self):
        default_bytes = numpy.dtype(float).itemsize * 8
        self.assertEqual(Float[default_bytes], Float.type_of(1.0))
        self.assertEqual(Float[default_bytes], Float.type_of(1000000000.0))
        self.assertEqual(Float[default_bytes], Float.type_of(-1000000000.0))
github ramonhagenaars / nptyping / tests / test_types / test_number.py View on Github external
def test_float_of(self):
        default_bytes = numpy.dtype(float).itemsize * 8
        self.assertEqual(Float[default_bytes], Float.type_of(1.0))
        self.assertEqual(Float[default_bytes], Float.type_of(1000000000.0))
        self.assertEqual(Float[default_bytes], Float.type_of(-1000000000.0))
github ramonhagenaars / nptyping / tests / test_types / test_number.py View on Github external
def test_float_of(self):
        default_bytes = numpy.dtype(float).itemsize * 8
        self.assertEqual(Float[default_bytes], Float.type_of(1.0))
        self.assertEqual(Float[default_bytes], Float.type_of(1000000000.0))
        self.assertEqual(Float[default_bytes], Float.type_of(-1000000000.0))