seung-lab / cloud-files

Threaded Python and CLI client library for AWS S3, Google Cloud Storage (GCS), in-memory, and the local filesystem.
BSD 3-Clause "New" or "Revised" License
38 stars 8 forks source link

fix: import error for numpy in JSON decoder #5

Closed william-silversmith closed 4 years ago

william-silversmith commented 4 years ago

I was trying to avoid a numpy dependency, but that function is very useful for everyone that is currently using CloudFiles. I considered using a try except for ImportError, but that would have been confusing for people used to seamless operation with numpy types.

Resolves #4

fcollman commented 4 years ago

i see your comment here about 'seamless' operation with numpy.. i guess i don't see what the lack of seamless operation would be?

william-silversmith commented 4 years ago

Non-seamless operation would be getting an error if numpy isn't installed and you're handling a numpy data type. I could post a message for how to fix it pip install numpy