(self, dev)
| 2000 | self._or_helper(gpu_dev) |
| 2001 | |
| 2002 | def _not_helper(self, dev): |
| 2003 | x = np.array([1.0, -1.0, 0, -0.1, 0, |
| 2004 | -7.0]).reshape(3, 2).astype(np.float32) |
| 2005 | |
| 2006 | y = np.logical_not(x) |
| 2007 | x = tensor.from_numpy(x) |
| 2008 | x.to_device(dev) |
| 2009 | |
| 2010 | result = autograd._not(x) |
| 2011 | |
| 2012 | np.testing.assert_array_almost_equal(tensor.to_numpy(result), |
| 2013 | y, |
| 2014 | decimal=5) |
| 2015 | |
| 2016 | def test_not_cpu(self): |
| 2017 | self._not_helper(cpu_dev) |
no test coverage detected