How to use the nptyping.py_type 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_functions / test_py_type.py View on Github external
def test_py_type(self):
        self.assertIs(int, py_type(np.dtype(int)))
        self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))
github ramonhagenaars / nptyping / tests / test_functions / test_py_type.py View on Github external
def test_py_type(self):
        self.assertIs(int, py_type(np.dtype(int)))
        self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))
github ramonhagenaars / nptyping / tests / test_functions / test_py_type.py View on Github external
def test_py_type(self):
        self.assertIs(int, py_type(np.dtype(int)))
        self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))
github ramonhagenaars / nptyping / tests / test_functions / test_py_type.py View on Github external
self.assertIs(int, py_type(np.dtype(int)))
        self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))
github ramonhagenaars / nptyping / tests / test_functions / test_py_type.py View on Github external
def test_py_type(self):
        self.assertIs(int, py_type(np.dtype(int)))
        self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))
github ramonhagenaars / nptyping / tests / test_functions / test_py_type.py View on Github external
self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))
github ramonhagenaars / nptyping / tests / test_functions / test_py_type.py View on Github external
def test_py_type(self):
        self.assertIs(int, py_type(np.dtype(int)))
        self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))
github ramonhagenaars / nptyping / tests / test_functions / test_py_type.py View on Github external
def test_py_type(self):
        self.assertIs(int, py_type(np.dtype(int)))
        self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))
github ramonhagenaars / nptyping / tests / test_functions / test_py_type.py View on Github external
def test_py_type(self):
        self.assertIs(int, py_type(np.dtype(int)))
        self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))
github ramonhagenaars / nptyping / tests / test_functions / test_py_type.py View on Github external
def test_py_type(self):
        self.assertIs(int, py_type(np.dtype(int)))
        self.assertIs(str, py_type(np.dtype(str)))
        self.assertIs(object, py_type(np.dtype(object)))
        self.assertIs(float, py_type(np.dtype(float)))

        self.assertIs(int, py_type(np.int))
        self.assertIs(int, py_type(np.int16))
        self.assertIs(int, py_type(np.int32))
        self.assertIs(int, py_type(np.int64))

        self.assertIs(float, py_type(np.float))
        self.assertIs(float, py_type(np.float16))
        self.assertIs(float, py_type(np.float32))
        self.assertIs(float, py_type(np.float64))

        self.assertIs(datetime, py_type(np.datetime64))
        self.assertIs(timedelta, py_type(np.timedelta64))