Closed yuchenpang closed 4 years ago
import ctf a = ctf.ones(2, dtype=float) print(a) # array([0., 0.]) (should be array([1., 1.]))
a is initialized to all zeros by ctf.ones() if dtype is set to int, float, or complex, but it works correctly when dtype is set to None.
a
ctf.ones()
dtype
int
float
complex
None
a
is initialized to all zeros byctf.ones()
ifdtype
is set toint
,float
, orcomplex
, but it works correctly whendtype
is set toNone
.