Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Chose computation accuracy 32/64/128 #726

@OrtnerMichael

Description

@OrtnerMichael

Currently Magpylib converts everything into float64.

At the bottom levels tests with dtype=int inputs fail because of typecasting. (specifically casting a float 0<f<1 into an dtype int array results in a lot of zeros.

however, with numpy py float32, float64 and float128 available one should consider to allow for different input types, and adjust the output types accordingly.

Reason for using float128: While all expressions are explicit, near undetermined forms they have limited precision
Reason for using float32: speed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions