I'm pretty sure lat0, lon0, and h0 must always be scalars. If I provide scalar float or int to these args I get type checking errors. Furthermore, lat, lon, and hmay be either scalar or n-dimensional. If all these args are scalars, the function returns a tuple of three floats, not three ndarrays.
Admittedly numpy and type checking are a tricky business, so it may be better to only annotate non-numeric stuff. Alternatively, consider looking into numpy.typing and ArrayLike.
I think this probably applies to quite a number of other conversion functions, but I haven't looked into them.
pymap3d.geodetic2enu
has the following type signature:I'm pretty sure
lat0
,lon0
, andh0
must always be scalars. If I provide scalarfloat
orint
to these args I get type checking errors. Furthermore,lat
,lon
, andh
may be either scalar or n-dimensional. If all these args are scalars, the function returns a tuple of threefloat
s, not threendarray
s.Admittedly numpy and type checking are a tricky business, so it may be better to only annotate non-numeric stuff. Alternatively, consider looking into
numpy.typing
andArrayLike
.I think this probably applies to quite a number of other conversion functions, but I haven't looked into them.