module documentation
Python 3.X compatibility tools.
While this file was originally intended for Python 2 -> 3 transition, it is now used to create a compatibility layer between different minor versions of Python 3.
While the active version of numpy may not support a given version of python, we allow downstream libraries to continue to use these shims for forward compatibility with numpy while they transition their code to newer versions of Python.
Class | contextlib |
Context manager that does no additional processing. |
Function | asbytes |
Undocumented |
Function | asbytes |
Undocumented |
Function | asstr |
Undocumented |
Function | asunicode |
Undocumented |
Function | asunicode |
Undocumented |
Function | getexception |
Undocumented |
Function | is |
Check whether obj is a pathlib.Path object. |
Function | isfileobj |
Undocumented |
Function | npy |
Load a module. Uses load_module which will be deprecated in python 3.12. An alternative that uses exec_module is in numpy.distutils.misc_util.exec_mod_from_location |
Function | open |
Undocumented |
Function | sixu |
Undocumented |
Variable | integer |
Undocumented |
Variable | strchar |
Undocumented |
Check whether obj is a pathlib.Path
object.
Prefer using isinstance(obj, os.PathLike) instead of this function.
Load a module. Uses load_module which will be deprecated in python 3.12. An alternative that uses exec_module is in numpy.distutils.misc_util.exec_mod_from_location
New in version 1.11.2.
Parameters | |
name:str | Full module name. |
fn:str | Path to module file. |
info:tuple , optional | Only here for backward compatibility with Python 2.*. |
Returns | |
module | mod |