(blob, dtype, shape=(-1,))
| 136 | |
| 137 | |
| 138 | def blob_to_array(blob, dtype, shape=(-1,)): |
| 139 | if IS_PYTHON3: |
| 140 | return np.fromstring(blob, dtype=dtype).reshape(*shape) |
| 141 | else: |
| 142 | return np.frombuffer(blob, dtype=dtype).reshape(*shape) |
| 143 | |
| 144 | |
| 145 | class COLMAPDatabase(sqlite3.Connection): |