Reference Issues/PRs
def test_complete_incomplete_additional_scenarios_errors_np_array(basic_store):
lib: NativeVersionStore = basic_store
np_arr = np.array([1,2], dtype=np.int64)
np_arr_add = np.array([3, 4, 5], dtype=np.int64)
symbol = "A"
symbolB = "B"
# This will pass
lib.write(symbol, np_arr)
lib.append(symbol, np_arr_add)
[lib.read](https://lib.read/)(symbol).data
lib.stage(symbolB, np_arr, validate_index=False)
lib.stage(symbolB, np_arr_add, validate_index=False)
lib.compact_incomplete(symbolB, append=False,
validate_index=False, convert_int_to_float=False, delete_staged_data_on_failure=True)
[lib.read](https://lib.read/)(symbolB).data
---------------
> [lib.read](https://lib.read/)(symbolB).data
python/tests/integration/arcticdb/version_store/test_basic_operations_scenarios.py:1160:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python/arcticdb/version_store/_store.py:2088: in read
return self._post_process_dataframe(read_result, read_query, implement_read_index)
python/arcticdb/version_store/_store.py:2198: in _post_process_dataframe
vitem = self._adapt_read_res(read_result)
python/arcticdb/version_store/_store.py:2438: in _adapt_read_res
data = self._normalizer.denormalize(read_result.frame_data, read_result.norm)
python/arcticdb/version_store/_normalization.py:1505: in denormalize
return [self.np](https://self.np/).denormalize(item, norm_meta.np)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <arcticdb.version_store._normalization.NdArrayNormalizer object at 0x7f0e3f21e1d0>
item = FrameData(data=[array([3, 4, 5, 1, 2])], names=['ndarray'], index_columns=[], row_count=5, offset=0)
norm_meta = shape: 3
def denormalize(self, item, norm_meta):
original_shape = tuple(norm_meta.shape)
data = [item.data](https://item.data/)[0]
> return data.reshape(original_shape)
E ValueError: cannot reshape array of size 5 into shape (3,)
python/arcticdb/version_store/_normalization.py:935: ValueError
What does this implement or fix?
Any other comments?
Checklist
Checklist for code changes...
- [ ] Have you updated the relevant docstrings, documentation and copyright notice?
- [ ] Is this contribution tested against all ArcticDB's features?
- [ ] Do all exceptions introduced raise appropriate error messages?
- [ ] Are API changes highlighted in the PR description?
- [ ] Is the PR labelled as enhancement or bug so it appears in autogenerated release notes?