Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

difference between iterblocks and nchunks #388

Open
simonm3 opened this issue Jan 9, 2019 · 2 comments
Open

difference between iterblocks and nchunks #388

simonm3 opened this issue Jan 9, 2019 · 2 comments

Comments

@simonm3
Copy link

simonm3 commented Jan 9, 2019

From the code below there are 62 blocks but nchunks is 61. Why is that?

import bcolz
a=bcolz.carray(np.array([1,2,3,4]*999999))
print(len(list(bcolz.iterblocks(a))), a.nchunks)
@FrancescAlted
Copy link
Member

Yes, that's intended. a.nchunks is the number of chunks that are complete, whereas iterblocks iterates over the remainder block.

@simonm3
Copy link
Author

simonm3 commented Jan 10, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants