|
1 |
| -from ._types import List, Tuple, Union, array, dtype, finfo_object, iinfo_object |
| 1 | +from ._types import Union, array, dtype, finfo_object, iinfo_object |
2 | 2 |
|
3 | 3 | def astype(x: array, dtype: dtype, /, *, copy: bool = True) -> array:
|
4 | 4 | """
|
@@ -27,38 +27,6 @@ def astype(x: array, dtype: dtype, /, *, copy: bool = True) -> array:
|
27 | 27 | an array having the specified data type. The returned array must have the same shape as ``x``.
|
28 | 28 | """
|
29 | 29 |
|
30 |
| -def broadcast_arrays(*arrays: array) -> List[array]: |
31 |
| - """ |
32 |
| - Broadcasts one or more arrays against one another. |
33 |
| -
|
34 |
| - Parameters |
35 |
| - ---------- |
36 |
| - arrays: array |
37 |
| - an arbitrary number of to-be broadcasted arrays. |
38 |
| -
|
39 |
| - Returns |
40 |
| - ------- |
41 |
| - out: List[array] |
42 |
| - a list of broadcasted arrays. Each array must have the same shape. Each array must have the same dtype as its corresponding input array. |
43 |
| - """ |
44 |
| - |
45 |
| -def broadcast_to(x: array, /, shape: Tuple[int, ...]) -> array: |
46 |
| - """ |
47 |
| - Broadcasts an array to a specified shape. |
48 |
| -
|
49 |
| - Parameters |
50 |
| - ---------- |
51 |
| - x: array |
52 |
| - array to broadcast. |
53 |
| - shape: Tuple[int, ...] |
54 |
| - array shape. Must be compatible with ``x`` (see :ref:`broadcasting`). If the array is incompatible with the specified shape, the function should raise an exception. |
55 |
| -
|
56 |
| - Returns |
57 |
| - ------- |
58 |
| - out: array |
59 |
| - an array having a specified shape. Must have the same data type as ``x``. |
60 |
| - """ |
61 |
| - |
62 | 30 | def can_cast(from_: Union[dtype, array], to: dtype, /) -> bool:
|
63 | 31 | """
|
64 | 32 | Determines if one data type can be cast to another data type according :ref:`type-promotion` rules.
|
@@ -156,4 +124,4 @@ def result_type(*arrays_and_dtypes: Union[array, dtype]) -> dtype:
|
156 | 124 | the dtype resulting from an operation involving the input arrays and dtypes.
|
157 | 125 | """
|
158 | 126 |
|
159 |
| -__all__ = ['astype', 'broadcast_arrays', 'broadcast_to', 'can_cast', 'finfo', 'iinfo', 'result_type'] |
| 127 | +__all__ = ['astype', 'can_cast', 'finfo', 'iinfo', 'result_type'] |
0 commit comments