Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_type_of(self):
arr1 = np.array([1, 2, 3])
arr2 = np.array([1, 2, '3'])
arr3 = np.array([1, 2, 3.0])
arr4 = np.array([1, 2, {}])
t1 = NDArray.type_of(arr1)
t2 = NDArray.type_of(arr2)
t3 = NDArray.type_of(arr3)
t4 = NDArray.type_of(arr4)
self.assertIsInstance(arr1, t1)
self.assertIsInstance(arr2, t2)
self.assertIsInstance(arr3, t3)
self.assertIsInstance(arr4, t4)
def test_type_of(self):
arr1 = np.array([1, 2, 3])
arr2 = np.array([1, 2, '3'])
arr3 = np.array([1, 2, 3.0])
arr4 = np.array([1, 2, {}])
t1 = NDArray.type_of(arr1)
t2 = NDArray.type_of(arr2)
t3 = NDArray.type_of(arr3)
t4 = NDArray.type_of(arr4)
self.assertIsInstance(arr1, t1)
self.assertIsInstance(arr2, t2)
self.assertIsInstance(arr3, t3)
self.assertIsInstance(arr4, t4)
def test_type_of(self):
arr1 = np.array([1, 2, 3])
arr2 = np.array([1, 2, '3'])
arr3 = np.array([1, 2, 3.0])
arr4 = np.array([1, 2, {}])
t1 = NDArray.type_of(arr1)
t2 = NDArray.type_of(arr2)
t3 = NDArray.type_of(arr3)
t4 = NDArray.type_of(arr4)
self.assertIsInstance(arr1, t1)
self.assertIsInstance(arr2, t2)
self.assertIsInstance(arr3, t3)
self.assertIsInstance(arr4, t4)
def test_type_of(self):
arr1 = np.array([1, 2, 3])
arr2 = np.array([1, 2, '3'])
arr3 = np.array([1, 2, 3.0])
arr4 = np.array([1, 2, {}])
t1 = NDArray.type_of(arr1)
t2 = NDArray.type_of(arr2)
t3 = NDArray.type_of(arr3)
t4 = NDArray.type_of(arr4)
self.assertIsInstance(arr1, t1)
self.assertIsInstance(arr2, t2)
self.assertIsInstance(arr3, t3)
self.assertIsInstance(arr4, t4)