(self)
| 287 | self._testBinary(bitwise_ops.right_shift, lhs, rhs, expected=expected) |
| 288 | |
| 289 | def testAdd(self): |
| 290 | for dtype in self.numeric_types: |
| 291 | self._testBinary( |
| 292 | math_ops.add, |
| 293 | np.array([1, 2, 0], dtype=dtype), |
| 294 | np.array([10, 20, 0], dtype=dtype), |
| 295 | expected=np.array([11, 22, 0], dtype=dtype)) |
| 296 | self._testBinary( |
| 297 | math_ops.add, |
| 298 | dtype(5), |
| 299 | np.array([1, 2], dtype=dtype), |
| 300 | expected=np.array([6, 7], dtype=dtype)) |
| 301 | self._testBinary( |
| 302 | math_ops.add, |
| 303 | np.array([[1], [2]], dtype=dtype), |
| 304 | dtype(7), |
| 305 | expected=np.array([[8], [9]], dtype=dtype)) |
| 306 | |
| 307 | if dtype not in self.int_types: |
| 308 | self._testBinary( |
| 309 | math_ops.add, |
| 310 | np.array([1.9131952969218875, 1.596299504298079], dtype=dtype), |
| 311 | np.array([1.1137667913355869, 1.7186636469261405], dtype=dtype), |
| 312 | expected=np.array([3.0269620882574744, 3.3149631512242195], |
| 313 | dtype=dtype)) |
| 314 | |
| 315 | def testMultiply(self): |
| 316 | for dtype in self.numeric_types: |
nothing calls this directly
no test coverage detected