MCPcopy Create free account
hub / github.com/numpy/numpy / _data

Method _data

numpy/core/tests/test_simd.py:41–54  ·  view source on GitHub ↗

Create list of consecutive numbers according to number of vector's lanes.

(self, start=None, count=None, reverse=False)

Source from the content-addressed store, hash-verified

39 return getattr(self.npyv, f"{intrin_name}_{self.sfx}x2")
40
41 def _data(self, start=None, count=None, reverse=False):
42 """
43 Create list of consecutive numbers according to number of vector's lanes.
44 """
45 if start is None:
46 start = 1
47 if count is None:
48 count = self.nlanes
49 rng = range(start, start + count)
50 if reverse:
51 rng = reversed(rng)
52 if self._is_fp():
53 return [x / 1.0 for x in rng]
54 return list(rng)
55
56 def _is_unsigned(self):
57 return self.sfx[0] == 'u'

Callers

nothing calls this directly

Calls 1

_is_fpMethod · 0.95

Tested by

no test coverage detected