Skip to content

Fix `ift.Field.vdot` breaking with np.uint32 and other integer types

Lukas Platz requested to merge fix_ducc_dispatcher into NIFTy_8

Hi Martin,

I just stumbled over ducc0.misc.vdot not multiplying doubles and integers, which is required in the PoissonianEnergy. It seems Philipp Arras did so, too, a while ago, but unfortunately his mitigation was incomplete, as it did only catch np.int64s.

Is there a double*integer vdot in ducc0 that we could call instead of the conversion?

While at it: I noticed ift.PoissonianEnergy enforces integer-typed data fields (sensible for Poisson counts), but then passes them directly to vdot, triggering an int->double conversion in each application. Should we cast the data field to double in the initialization of PoissonianEnergy after the integer check to avoid this?

Cheers, Lukas

Merge request reports

Loading