(self, array)
| 153 | return self |
| 154 | |
| 155 | def putNumpy(self, array): |
| 156 | # Post numpy array as json payload |
| 157 | np_loader = pkgutil.find_loader('numpy') |
| 158 | if np_loader is not None: |
| 159 | import numpy as np |
| 160 | encoded_array = array.tolist() |
| 161 | self.putJson(encoded_array) |
| 162 | return self |
| 163 | else: |
| 164 | raise DataApiError("Attempted to .putNumpy() a file without numpy available, please install numpy.") |
| 165 | |
| 166 | def putAsZip(self, path): |
| 167 | """Zip file/directory and upload to data API location defined by `DataFile` object. |