mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 23:48:01 -05:00
move permute/flip/shrink to mixins (#13113)
* move permute to mixins * move more stuff * two more * fix local mypy * fix tests * fix shrink
This commit is contained in:
@@ -894,7 +894,7 @@ class TestNumpy(unittest.TestCase):
|
||||
a = Tensor([[1, 2, 3],
|
||||
[4, 5, 6],
|
||||
[7, 8, 9]])
|
||||
self.assertIsNot(a[...], a)
|
||||
self.assertIs(a[...], a)
|
||||
numpy_testing_assert_equal_helper(a[...], a)
|
||||
# `a[...]` was `a` in numpy <1.9.
|
||||
#numpy_testing_assert_equal_helper(data_ptr(a[...]), data_ptr(a))
|
||||
@@ -1037,9 +1037,9 @@ class TestNumpy(unittest.TestCase):
|
||||
# Before `...` would return a itself.
|
||||
a = Tensor([5])
|
||||
|
||||
self.assertIsNot(a, a[()])
|
||||
self.assertIsNot(a, a[...])
|
||||
self.assertIsNot(a, a[:])
|
||||
self.assertIs(a, a[()])
|
||||
self.assertIs(a, a[...])
|
||||
self.assertIs(a, a[:])
|
||||
|
||||
def test_broaderrors_indexing(self):
|
||||
a = Tensor.zeros(5, 5)
|
||||
|
||||
Reference in New Issue
Block a user