hello, I’m a beginer. when I import complex module and arraymancer module like this.
import arraymancer, fft, utils
import complex
let s: Tensor[float] = hamming[float](1024)
var data = fft(s).map(abs)
write_npy(data, "hanning_fft.npy")
I got these errors.I know some converters in arraymancer, so uint64 will be converted to Complex, so the signature of this two function , namely $, may be the same.I am not sure.
/root/.nimble/pkgs/arraymancer-0.5.2/io/io_npy.nim(172, 22) Error: ambiguous call; both system.$(x: uint64) [declared in /root/.choosenim/toolchains/nim-#devel/lib/system/strmantle.nim(288, 6)] and complex.$(z: Complex) [declared in /root/.choosenim/toolchains/nim-#devel/lib/pure/complex.nim(344, 6)] match for: (byte)
I fix this when I only import abs from complex.
import arraymancer, fft, utils
from complex import abs
let s: Tensor[float] = hamming[float](1024)
var data = fft(s).map(abs)
write_npy(data, "hanning_fft.npy")
I want to know whether one module maybe lead to another’s Namespace pollution.
I've opened https://github.com/mratsim/Arraymancer/issues/394 in Arraymancer.
Those converters are private and were introduced to have less verbose code within Arraymancer. It's bad that they cause such issue so I will probably remove them. Plus I suspect that they contribute to my growing memory usage and time during compilation.