ju t d Z ddlmZ ddlmZ ddlmZ ddlmZm Z m
Z
mZ dZdd Z
ddZdddZddZddZdS )z)Different utilities for the numpy brains. )annotations)extract_node)InferenceContext) AttributeImportNameNodeNG)1200returnboolc 8 t } | o
| t k S )z*Returns True if numpy supports type hints.)_get_numpy_version NUMPY_VERSION_TYPE_HINTS_SUPPORT)np_vers q/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/astroid/brain/brain_numpy_utils.pynumpy_supports_type_hintsr s
!
!F?f??? tuple[str, str, str]c ddl } t | j j d S # t t
f$ r Y dS w xY w)zj
Return the numpy version number if numpy can be imported.
Otherwise returns ('0', '0', '0')
r N.)r r r )numpytupleversionsplitImportErrorAttributeError)r s r r r sX U]*0055666( s /2 AANcontextInferenceContext | Nonec L t | }| | S )N)r )r infer)srcnoder s r infer_numpy_memberr% % s# D::g:&&&r r$ r c | j d | d D }t fd|D S )a>
Returns True if the node is a representation of a numpy module.
For example in :
import numpy as np
x = np.linspace(1, 2)
The node