I am trying to concatenate two CSR matrices using the concatenate() function of Numpy, but the code gives ValueError.
data = np.concatenate([pos, neg], axis=0)
pos and neg are CSR matrices.
Here are the details of the error:
Traceback (most recent call last):
File "test_uci.py", line 211, in <module>
res = experiment_synthetic(random_state=100)
File "test_uci.py", line 130, in experiment_synthetic
data = np.concatenate([pos, neg], axis=0)
File "<__array_function__ internals>", line 5, in concatenate
ValueError: zero-dimensional arrays cannot be concatenated
How can I fix the error?