Skip to content
New issue

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

floating point exception while operating on empty container #1

Closed
yarikoptic opened this issue Nov 3, 2010 · 2 comments
Closed

floating point exception while operating on empty container #1

yarikoptic opened this issue Nov 3, 2010 · 2 comments

Comments

@yarikoptic
Copy link

e.g. when something like this (reading 2nd read of the same opened file):

 $> python -c 'import blosc; f=file("/home/yoh/.emacs", "rb"); print 1; blosc.compress(f.read(), typesize=8); print 2; blosc.compress(f.read(), typesize=8); print 3;'
1
2
zsh: floating point exception  python -c 
@FrancescAlted
Copy link
Member

Yes. This happens because your are telling blosc to compress a buffer with less bytes than the base type. Here it is a clearer example:

>>> import blosc
>>> blosc.compress("1"*8, 8)
'\x02\x01\x03\x08\x08\x00\x00\x00\x08\x00\x00\x00\x18\x00\x00\x0011111111'
>>> blosc.compress("1"*7, 8)
Excepció de coma flotant

That should be fixed indeed.

@FrancescAlted
Copy link
Member

Synced with blosc 1.1.2 (closed by fa5d163).

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants