Arraymancer
Arraymancer copied to clipboard
Replace deprecated `dataArray` with `toUnsafeView`
Following the hint.
Tests fail with Nim 1.0.x.
The issue can probably be solved by:
- importing std/typetraits in tensor/initialization.nim
- exporting std/typetraits in tensor/algorithms.nim
- using
mixin DistinctBase
in toUnsafeView
https://github.com/mratsim/Arraymancer/runs/4669608372?check_suite_focus=true#step:23:390
This looks like another instance of the generic sandwich https://github.com/nim-lang/Nim/issues/11225
@mratsim Thank you. I tried the suggestion without luck.
Does distinctBase
exist in nim 1.0.x?:
# test.nim
import std/typetraits
echo type(distinctBase)
# Not OK.
$ choosenim 1.0.10
$ nim c -r test.nim
[...]
/home/u/Arraymancer/test.nim(2, 11) Error: undeclared identifier: 'distinctBase'
# OK.
$ choosenim 1.2.16
$ nim c -r test.nim
[...]
None
@mratsim I believe this PR can be closed after :
- https://github.com/mratsim/Arraymancer/pull/570
- https://github.com/mratsim/Arraymancer/pull/569
were merged
Closing as unnecessary as mentioned by Clonkk. Thanks @asnt though and sorry for not getting it merged!