Type functions for Python builtins.
Resolve calls to math functions.
During type inference this annotates math calls, and during final specialization it produces LLVMIntrinsicNode and MathCallNode nodes.
Binary result type for math operations
Resolve calls to llvmmath math calls
Resolve calls to llvmmath math calls
Register all functions listed in mathsyms and n_ary_mathsyms
Infer types for NumPy functionality. This includes:
Figuring out dtypes
- e.g. np.double -> double
np.dtype(‘d’) -> double
Function calls such as np.empty/np.empty_like/np.arange/etc
Resolve a call to np.arange()
object -> array type:
array_from_object(ASTNode([[1, 2], [3, 4]])) => int64[:, :]
Demote 0d arrays to scalars
Resolve a call to np.dot()
Parse np.dtype(...) calls
Parse the result type for np.empty_like calls
Simple helper function to map an AST node dtype keyword argument => NumPy dtype. ‘
Promote scalar to 0d array type
Resolve the type for numpy dtype attributes
Typing function for numpy.tensordot().
Defaults to Python object for any caller that isn’t using the default argument to axes.
Otherwise, it is similar to inner(), but subtracts four dimensions from the result instead of two.
Without symbolic execution of the actual axes argument, this can’t determine the number of axes to sum over, so it punts. This typing function could use an array type of unknown dimensionality, were one available. See: https://www.pivotaltracker.com/story/show/43687249
Type inference for NumPy binary ufuncs and their methods.
Bases: object
Infer types for arbitrary ufunc
to double(double, double)
Convert ufunc type signature string (e.g. ‘dd->d’) to a function
Type inference for arbitrary ufuncs