Type hinting / annotation (PEP 484) for numpy.ndarray

前端 未结 5 1007
旧时难觅i
旧时难觅i 2020-12-14 14:03

Has anyone implemented type hinting for the specific numpy.ndarray class?

Right now, I\'m using typing.Any, but it would be nice to have something more specific.

5条回答
  •  醉话见心
    2020-12-14 15:03

    Check out DataShape. It uses the datatypes as well as some syntax for how big the input and output arrays should be.

提交回复
热议问题