We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grain.python.RangeDataSource.__getitem__()
There may be a bug in grain.python.RangeDataSource.__getitem__().
Minimal code to reproduce:
import grain.python as pygrain x = pygrain.RangeDataSource(start=1,stop=10,step=2) print(list(x))
Outputs:
--------------------------------------------------------------------------- AssertionError Traceback (most recent call last) [<ipython-input-5-88dd2177f112>](https://localhost:8080/#) in <cell line: 3>() 1 import grain.python as pygrain 2 x = pygrain.RangeDataSource(start=1,stop=10,step=2) ----> 3 print(list(x)) [/usr/local/lib/python3.10/dist-packages/grain/_src/python/data_sources.py](https://localhost:8080/#) in __getitem__(self, record_key) 92 def __getitem__(self, record_key: SupportsIndex) -> int: 93 record_key = record_key.__index__() ---> 94 assert record_key >= 0 and record_key < self._len 95 return self._start + record_key * self._step 96
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There may be a bug in
grain.python.RangeDataSource.__getitem__()
.Minimal code to reproduce:
Outputs:
The text was updated successfully, but these errors were encountered: