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
I have a const memoryview and I am trying to create a non-const memoryview by copying it. Naively I would expect it to be possible. Here is a snippet that reproduces the problem:
Memoryview 'const double[::1]' not conformable to memoryview 'double[:]'.
If I read the error correctly it seems like ro.copy() type is still const.
A bit more context: I am trying out cython 0.28b1 and experimenting with const memoryviews in a scikit-learn context.
Side-comment: it is a slight variation of 6704d23 where instead of creating rw and then replacing the values by using rw[:] = ..., I am trying to do it in one line (which feels like the thing you would write in practice).
The text was updated successfully, but these errors were encountered:
I have a const memoryview and I am trying to create a non-const memoryview by copying it. Naively I would expect it to be possible. Here is a snippet that reproduces the problem:
The error I get:
If I read the error correctly it seems like
ro.copy()
type is stillconst
.A bit more context: I am trying out cython 0.28b1 and experimenting with const memoryviews in a scikit-learn context.
Side-comment: it is a slight variation of 6704d23 where instead of creating
rw
and then replacing the values by usingrw[:] = ...
, I am trying to do it in one line (which feels like the thing you would write in practice).The text was updated successfully, but these errors were encountered: