'Why does bng_latlon OSGB36toWGS84 give incorrect calculation result?

I installed the python package bng_latlon

pip install bng_latlon

then ran

from bng_latlon import OSGB36toWGS84

OSGB36toWGS84(352500.2, 401400)

The expect result should be (53.50713, -2.71766), but I get (54.754303, -0.001713).

for

OSGB36toWGS84(538890, 177320)

it gives (nan,nan) as result.

May I ask why this happen? I suspect this is to do with system setting, but I am not sure.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source