imr-framework / pypulseq

Pulseq in Python
https://pypulseq.readthedocs.io
GNU Affero General Public License v3.0
112 stars 58 forks source link

Fix side effects of using numpy.round #87

Closed btasdelen closed 1 year ago

btasdelen commented 1 year ago

This commit fixes the bugs introduced in #84 due to numpy's rounding function. np.round outputs the value as np.float64, which can not be automatically cast as int, thus, can not be used for slicing the arrays.

sravan953 commented 1 year ago

Won't a simple int() casting work?

btasdelen commented 1 year ago

I think it is safe to assume waveforms_and_times() will return time points on gradient raster time. So you are right, it is enough.