MCPcopy
hub / github.com/pydata/xarray / test_count

Method test_count

xarray/tests/test_duck_array_ops.py:162–168  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

160 last(self.x, 3)
161
162 def test_count(self):
163 assert 12 == count(self.x)
164
165 expected = array([[1, 2, 3], [3, 2, 1]])
166 assert_array_equal(expected, count(self.x, axis=-1))
167
168 assert 1 == count(np.datetime64("2000-01-01"))
169
170 def test_where_type_promotion(self):
171 result = where(np.array([True, False]), np.array([1, 2]), np.array(["a", "b"]))

Callers

nothing calls this directly

Calls 2

countFunction · 0.90
arrayFunction · 0.85

Tested by

no test coverage detected