* prefix purpose? #5

Open
opened 2025-06-09 14:59:02 +02:00 by Benjamin_Loison · 1 comment
print(np.array_split(range(10), 3))
[array([0, 1, 2, 3]), array([4, 5, 6]), array([7, 8, 9])]
print(*np.array_split(range(10), 3))
[0 1 2 3] [4 5 6] [7 8 9]
 print(type(np.array_split(range(10), 3)))
<class 'list'>
print(type(*np.array_split(range(10), 3)))
Output:
Traceback (most recent call last):
  File "<console>", line 1, in <module>
TypeError: type.__new__() argument 1 must be str, not numpy.ndarray
```python print(np.array_split(range(10), 3)) ``` ``` [array([0, 1, 2, 3]), array([4, 5, 6]), array([7, 8, 9])] ``` ```python print(*np.array_split(range(10), 3)) ``` ``` [0 1 2 3] [4 5 6] [7 8 9] ``` ```python print(type(np.array_split(range(10), 3))) ``` ``` <class 'list'> ``` ```python print(type(*np.array_split(range(10), 3))) ``` <details> <summary>Output:</summary> ``` Traceback (most recent call last): File "<console>", line 1, in <module> TypeError: type.__new__() argument 1 must be str, not numpy.ndarray ``` </details>
Author
Owner
Would help the issue:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdA361Uw+ywK5ncs62RUzTehLnH6dpnPfOdVzoXKK3SpVgw
bHV2tlYKBLim5YxPnv/Zmx8fT3jULsRgMV02HlcWk0REtvzgBLi/SWzQoUAEppZl
0q4BU9LKENwZDJroAyt6HIzxT8xhP8dfCCdz3sN2e55AMUCkiYNbGySgZ+v90Bbh
gV1xr0KYrT5uqPf+mvFVZwvssNITxGsxs/SP2tmFYaJkjCEfmJ174L0DMO9rc4cS
q4XELigGEK669zqVkxDvxZ0d57h2OY24DZK0kxdRf516SqhU91aKtTrvQAT7PleJ
n2gGywsgo9Ad0WNWVOMZ4ymZlaVuJnnrpqY1OC3ztFk=
=e7fk
-----END PGP MESSAGE-----
<details> <summary>Would help the issue:</summary> ``` -----BEGIN PGP MESSAGE----- hF4DTQa9Wom5MBgSAQdA361Uw+ywK5ncs62RUzTehLnH6dpnPfOdVzoXKK3SpVgw bHV2tlYKBLim5YxPnv/Zmx8fT3jULsRgMV02HlcWk0REtvzgBLi/SWzQoUAEppZl 0q4BU9LKENwZDJroAyt6HIzxT8xhP8dfCCdz3sN2e55AMUCkiYNbGySgZ+v90Bbh gV1xr0KYrT5uqPf+mvFVZwvssNITxGsxs/SP2tmFYaJkjCEfmJ174L0DMO9rc4cS q4XELigGEK669zqVkxDvxZ0d57h2OY24DZK0kxdRf516SqhU91aKtTrvQAT7PleJ n2gGywsgo9Ad0WNWVOMZ4ymZlaVuJnnrpqY1OC3ztFk= =e7fk -----END PGP MESSAGE----- ``` </details>
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Benjamin_Loison/numpy#5
No description provided.