def test_dtype(self):
""" Test that dtype argument is working """
source = [np.ones((16,), dtype = np.float) for _ in range(10)]
product = last(iprod(source, dtype = np.int))
self.assertTrue(np.allclose(product, np.ones_like(product)))
self.assertEqual(product.dtype, np.int)
评论列表
文章目录