How to use the pyinterp.interface._core_function_suffix function in pyinterp

To help you get started, we’ve selected a few pyinterp 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 CNES / pangeo-pyinterp / tests / test_grid.py View on Github external
def test__core_function_suffix(self):
        with self.assertRaises(TypeError):
            pyinterp.interface._core_function_suffix(1)

        lon = pyinterp.Axis(np.arange(0, 360, 1), is_circle=True)
        lat = pyinterp.Axis(np.arange(-80, 80, 1), is_circle=False)
        matrix, _ = np.meshgrid(lon[:], lat[:])
        self.assertEqual(
            pyinterp.interface._core_function_suffix(
                pyinterp.core.Grid2DFloat64(lon, lat, matrix.T)), "float64")
        self.assertEqual(
            pyinterp.interface._core_function_suffix(
                pyinterp.core.Grid2DFloat32(lon, lat, matrix.T)), "float32")
github CNES / pangeo-pyinterp / tests / test_grid.py View on Github external
def test__core_function_suffix(self):
        with self.assertRaises(TypeError):
            pyinterp.interface._core_function_suffix(1)

        lon = pyinterp.Axis(np.arange(0, 360, 1), is_circle=True)
        lat = pyinterp.Axis(np.arange(-80, 80, 1), is_circle=False)
        matrix, _ = np.meshgrid(lon[:], lat[:])
        self.assertEqual(
            pyinterp.interface._core_function_suffix(
                pyinterp.core.Grid2DFloat64(lon, lat, matrix.T)), "float64")
        self.assertEqual(
            pyinterp.interface._core_function_suffix(
                pyinterp.core.Grid2DFloat32(lon, lat, matrix.T)), "float32")
github CNES / pangeo-pyinterp / tests / test_grid.py View on Github external
def test__core_function_suffix(self):
        with self.assertRaises(TypeError):
            pyinterp.interface._core_function_suffix(1)

        lon = pyinterp.Axis(np.arange(0, 360, 1), is_circle=True)
        lat = pyinterp.Axis(np.arange(-80, 80, 1), is_circle=False)
        matrix, _ = np.meshgrid(lon[:], lat[:])
        self.assertEqual(
            pyinterp.interface._core_function_suffix(
                pyinterp.core.Grid2DFloat64(lon, lat, matrix.T)), "float64")
        self.assertEqual(
            pyinterp.interface._core_function_suffix(
                pyinterp.core.Grid2DFloat32(lon, lat, matrix.T)), "float32")