We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f038dd8 commit 0a8b8a0Copy full SHA for 0a8b8a0
cf/test/test_Field.py
@@ -1679,6 +1679,14 @@ def test_Field_indices(self):
1679
g = f[indices]
1680
self.assertFalse(np.ma.is_masked(g.array))
1681
1682
+ # Test API with 0/1/2 arguments
1683
+ kwargs = {"grid_latitude": [1]}
1684
+ i = f.indices(**kwargs)
1685
+ j = f.indices(0, **kwargs)
1686
+ k = f.indices("compress", 0, **kwargs)
1687
+ self.assertEqual(i, j)
1688
+ self.assertEqual(i, k)
1689
+
1690
# Subspace has size 0 axis resulting from dask array index
1691
indices = f.indices(grid_latitude=cf.contains(-23.2))
1692
with self.assertRaises(IndexError):
0 commit comments