You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we need to access data from other buckets and save our results to other buckets.
As it stands, the cc.interface instance has a set_bucket method for this, but it's very cumbersome:
>>> import cottoncandy as cc
>>> cci = cc.get_interface('my_data_bucket')
>>> arr = cci.download_raw_array('path/to/my/array')
>>> result = np.log(arr + 1)
>>> cci.set_bucket('my_results_bucket')
>>> cci.upload_raw_array('path/to/my/results/array', result)
>>> cci.set_bucket('my_data_bucket')
Instead, a little ~ syntax might be useful
>>> import cottoncandy as cc
>>> cci = cc.get_interface('my_data_bucket')
>>> arr = cci.download_raw_array('path/to/my/array')
>>> result = np.log(arr + 1)
>>> cci.upload_raw_array('~my_results_bucket/path/to/my/results/array', result)
>>> print cci.bucket_name # default bucket is still the same
my_data_bucket
sound good?
The text was updated successfully, but these errors were encountered:
Sometimes we need to access data from other buckets and save our results to other buckets.
As it stands, the
cc.interface
instance has aset_bucket
method for this, but it's very cumbersome:Instead, a little
~
syntax might be usefulsound good?
The text was updated successfully, but these errors were encountered: