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