You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for sharing the code. I tried to run your python script "demo_confidence_map.py", and it worked well when mode=='bf' and 'cg'. However, when I turn the mode to be 'gpu', it throws this error:
File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 387, in confidence_map
X = np.array([_clean_labels_ar(Xline, labels, copy=True).reshape(dims) for Xline in X])
File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 387, in
X = np.array([_clean_labels_ar(Xline, labels, copy=True).reshape(dims) for Xline in X])
File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 127, in _clean_labels_ar
X = X.astype(labels.dtype)
AttributeError: 'Vector' object has no attribute 'astype'
When I change the line "X = X.astype(labels.dtype)" in the function _clean_labels_ar to be
"X = np.array(X, dtype=labels.dtype)", it throws another error:
......
File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 128, in _clean_labels_ar
X = np.array(X, dtype=labels.dtype)
ValueError: setting an array element with a sequence.
I have not figured out what caused the problem. May I ask for your help? Thank you very much in advance!
Best regards,
Keyu
The text was updated successfully, but these errors were encountered:
Hi,
Thank you for sharing the code. I tried to run your python script "demo_confidence_map.py", and it worked well when mode=='bf' and 'cg'. However, when I turn the mode to be 'gpu', it throws this error:
File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 387, in confidence_map
X = np.array([_clean_labels_ar(Xline, labels, copy=True).reshape(dims) for Xline in X])
File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 387, in
X = np.array([_clean_labels_ar(Xline, labels, copy=True).reshape(dims) for Xline in X])
File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 127, in _clean_labels_ar
X = X.astype(labels.dtype)
AttributeError: 'Vector' object has no attribute 'astype'
When I change the line "X = X.astype(labels.dtype)" in the function _clean_labels_ar to be
"X = np.array(X, dtype=labels.dtype)", it throws another error:
......
File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 128, in _clean_labels_ar
X = np.array(X, dtype=labels.dtype)
ValueError: setting an array element with a sequence.
I have not figured out what caused the problem. May I ask for your help? Thank you very much in advance!
Best regards,
Keyu
The text was updated successfully, but these errors were encountered: