(self, x)
| 48 | class ZeroFractionTest(test_lib.TestCase): |
| 49 | |
| 50 | def _ZeroFraction(self, x): |
| 51 | assert x.shape |
| 52 | total_elements = np.prod(x.shape) |
| 53 | nonzeros = np.count_nonzero(x.flatten()) |
| 54 | return 1.0 - nonzeros / total_elements |
| 55 | |
| 56 | @test_util.run_deprecated_v1 |
| 57 | def testZeroFraction(self): |
no test coverage detected