| 54 | assert batch(bat=100) & instance(flat=50) & channel(vector='x,y') == s.shape |
| 55 | |
| 56 | def test_reshaping_const_radius(self): |
| 57 | s = Sphere(stack([vec(x=0, y=0)] * 50, instance('points')), radius=1) |
| 58 | s = expand(s, batch(b=100)) |
| 59 | s = rename_dims(s, 'b', 'bat') |
| 60 | s = unpack_dim(s, 'points', spatial(x=10, y=5)) |
| 61 | assert batch(bat=100) & spatial(x=10, y=5) & channel(vector='x,y') == s.shape |
| 62 | s = pack_dims(s, 'x,y', instance('particles')) |
| 63 | assert batch(bat=100) & instance(particles=50) & channel(vector='x,y') == s.shape |
| 64 | s = flatten(s) |
| 65 | assert batch(bat=100) & instance(flat=50) & channel(vector='x,y') == s.shape |
| 66 | |
| 67 | def test_sphere_no_corners(self): |
| 68 | s = Sphere(x=0, y=0, radius=1) |