Skip to content

Commit 9c8c4a3

Browse files
authored
Merge pull request #5028 from jepler/ulab-fix-docs
ulab: move documentation to the right location
2 parents 10645bf + 8cf6fd7 commit 9c8c4a3

File tree

4 files changed

+60
-45
lines changed

4 files changed

+60
-45
lines changed

locale/circuitpython.pot

Lines changed: 53 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,11 +2508,11 @@ msgstr ""
25082508
msgid "arg must be user-type"
25092509
msgstr ""
25102510

2511-
#: extmod/ulab/code/numpy/numerical/numerical.c
2511+
#: extmod/ulab/code/numpy/numerical.c
25122512
msgid "argsort argument must be an ndarray"
25132513
msgstr ""
25142514

2515-
#: extmod/ulab/code/numpy/numerical/numerical.c
2515+
#: extmod/ulab/code/numpy/numerical.c
25162516
msgid "argsort is not implemented for flattened arrays"
25172517
msgstr ""
25182518

@@ -2533,8 +2533,7 @@ msgstr ""
25332533
msgid "argument should be a '%q' not a '%q'"
25342534
msgstr ""
25352535

2536-
#: extmod/ulab/code/numpy/numerical/numerical.c
2537-
#: extmod/ulab/code/numpy/transform/transform.c
2536+
#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/numpy/transform.c
25382537
msgid "arguments must be ndarrays"
25392538
msgstr ""
25402539

@@ -2547,27 +2546,27 @@ msgstr ""
25472546
msgid "array/bytes required on right side"
25482547
msgstr ""
25492548

2550-
#: extmod/ulab/code/numpy/numerical/numerical.c
2549+
#: extmod/ulab/code/numpy/numerical.c
25512550
msgid "attempt to get (arg)min/(arg)max of empty sequence"
25522551
msgstr ""
25532552

2554-
#: extmod/ulab/code/numpy/numerical/numerical.c
2553+
#: extmod/ulab/code/numpy/numerical.c
25552554
msgid "attempt to get argmin/argmax of an empty sequence"
25562555
msgstr ""
25572556

25582557
#: py/objstr.c
25592558
msgid "attributes not supported yet"
25602559
msgstr ""
25612560

2562-
#: extmod/ulab/code/numpy/numerical/numerical.c
2561+
#: extmod/ulab/code/numpy/numerical.c
25632562
msgid "axis is out of bounds"
25642563
msgstr ""
25652564

2566-
#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c
2565+
#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c
25672566
msgid "axis must be None, or an integer"
25682567
msgstr ""
25692568

2570-
#: extmod/ulab/code/numpy/numerical/numerical.c
2569+
#: extmod/ulab/code/numpy/numerical.c
25712570
msgid "axis too long"
25722571
msgstr ""
25732572

@@ -2789,6 +2788,10 @@ msgid ""
27892788
"can't switch from manual field specification to automatic field numbering"
27902789
msgstr ""
27912790

2791+
#: extmod/ulab/code/ndarray.c
2792+
msgid "cannot assign new shape"
2793+
msgstr ""
2794+
27922795
#: extmod/ulab/code/ndarray_operators.c
27932796
msgid "cannot cast output with casting rule"
27942797
msgstr ""
@@ -2885,27 +2888,27 @@ msgstr ""
28852888
msgid "conversion to object"
28862889
msgstr ""
28872890

2888-
#: extmod/ulab/code/numpy/filter/filter.c
2891+
#: extmod/ulab/code/numpy/filter.c
28892892
msgid "convolve arguments must be linear arrays"
28902893
msgstr ""
28912894

2892-
#: extmod/ulab/code/numpy/filter/filter.c
2895+
#: extmod/ulab/code/numpy/filter.c
28932896
msgid "convolve arguments must be ndarrays"
28942897
msgstr ""
28952898

2896-
#: extmod/ulab/code/numpy/filter/filter.c
2899+
#: extmod/ulab/code/numpy/filter.c
28972900
msgid "convolve arguments must not be empty"
28982901
msgstr ""
28992902

2900-
#: extmod/ulab/code/numpy/poly/poly.c
2903+
#: extmod/ulab/code/numpy/poly.c
29012904
msgid "could not invert Vandermonde matrix"
29022905
msgstr ""
29032906

29042907
#: shared-module/sdcardio/SDCard.c
29052908
msgid "couldn't determine SD card version"
29062909
msgstr ""
29072910

2908-
#: extmod/ulab/code/numpy/numerical/numerical.c
2911+
#: extmod/ulab/code/numpy/numerical.c
29092912
msgid "cross is defined for 1D arrays of length 3"
29102913
msgstr ""
29112914

@@ -2955,15 +2958,15 @@ msgstr ""
29552958
msgid "dict update sequence has wrong length"
29562959
msgstr ""
29572960

2958-
#: extmod/ulab/code/numpy/numerical/numerical.c
2961+
#: extmod/ulab/code/numpy/numerical.c
29592962
msgid "diff argument must be an ndarray"
29602963
msgstr ""
29612964

2962-
#: extmod/ulab/code/numpy/numerical/numerical.c
2965+
#: extmod/ulab/code/numpy/numerical.c
29632966
msgid "differentiation order out of range"
29642967
msgstr ""
29652968

2966-
#: extmod/ulab/code/numpy/transform/transform.c
2969+
#: extmod/ulab/code/numpy/transform.c
29672970
msgid "dimensions do not match"
29682971
msgstr ""
29692972

@@ -3090,7 +3093,7 @@ msgstr ""
30903093
msgid "filesystem must provide mount method"
30913094
msgstr ""
30923095

3093-
#: extmod/ulab/code/numpy/vector/vector.c
3096+
#: extmod/ulab/code/numpy/vector.c
30943097
msgid "first argument must be a callable"
30953098
msgstr ""
30963099

@@ -3102,7 +3105,7 @@ msgstr ""
31023105
msgid "first argument must be a tuple of ndarrays"
31033106
msgstr ""
31043107

3105-
#: extmod/ulab/code/numpy/vector/vector.c
3108+
#: extmod/ulab/code/numpy/vector.c
31063109
msgid "first argument must be an ndarray"
31073110
msgstr ""
31083111

@@ -3118,7 +3121,7 @@ msgstr ""
31183121
msgid "flattening order must be either 'C', or 'F'"
31193122
msgstr ""
31203123

3121-
#: extmod/ulab/code/numpy/numerical/numerical.c
3124+
#: extmod/ulab/code/numpy/numerical.c
31223125
msgid "flip argument must be an ndarray"
31233126
msgstr ""
31243127

@@ -3246,7 +3249,7 @@ msgstr ""
32463249
msgid "index is out of bounds"
32473250
msgstr ""
32483251

3249-
#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c
3252+
#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c
32503253
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
32513254
#: shared-bindings/bitmaptools/__init__.c
32523255
msgid "index out of range"
@@ -3288,7 +3291,7 @@ msgstr ""
32883291
msgid "input arrays are not compatible"
32893292
msgstr ""
32903293

3291-
#: extmod/ulab/code/numpy/poly/poly.c
3294+
#: extmod/ulab/code/numpy/poly.c
32923295
msgid "input data must be an iterable"
32933296
msgstr ""
32943297

@@ -3321,15 +3324,15 @@ msgstr ""
33213324
msgid "input must be square matrix"
33223325
msgstr ""
33233326

3324-
#: extmod/ulab/code/numpy/numerical/numerical.c
3327+
#: extmod/ulab/code/numpy/numerical.c
33253328
msgid "input must be tuple, list, range, or ndarray"
33263329
msgstr ""
33273330

3328-
#: extmod/ulab/code/numpy/poly/poly.c
3331+
#: extmod/ulab/code/numpy/poly.c
33293332
msgid "input vectors must be of equal length"
33303333
msgstr ""
33313334

3332-
#: extmod/ulab/code/numpy/poly/poly.c
3335+
#: extmod/ulab/code/numpy/poly.c
33333336
msgid "inputs are not iterable"
33343337
msgstr ""
33353338

@@ -3341,7 +3344,7 @@ msgstr ""
33413344
msgid "integer required"
33423345
msgstr ""
33433346

3344-
#: extmod/ulab/code/numpy/approx/approx.c
3347+
#: extmod/ulab/code/numpy/approx.c
33453348
msgid "interp is defined for 1D iterables of equal length"
33463349
msgstr ""
33473350

@@ -3516,7 +3519,7 @@ msgstr ""
35163519
msgid "maxiter should be > 0"
35173520
msgstr ""
35183521

3519-
#: extmod/ulab/code/numpy/numerical/numerical.c
3522+
#: extmod/ulab/code/numpy/numerical.c
35203523
msgid "median argument must be an ndarray"
35213524
msgstr ""
35223525

@@ -3533,11 +3536,15 @@ msgstr ""
35333536
msgid "memoryview: length is not a multiple of itemsize"
35343537
msgstr ""
35353538

3539+
#: extmod/ulab/code/numpy/linalg/linalg.c
3540+
msgid "mode must be complete, or reduced"
3541+
msgstr ""
3542+
35363543
#: py/builtinimport.c
35373544
msgid "module not found"
35383545
msgstr ""
35393546

3540-
#: extmod/ulab/code/numpy/poly/poly.c
3547+
#: extmod/ulab/code/numpy/poly.c
35413548
msgid "more degrees of freedom than data points"
35423549
msgstr ""
35433550

@@ -3770,16 +3777,24 @@ msgstr ""
37703777
msgid "opcode"
37713778
msgstr ""
37723779

3773-
#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c
3774-
#: extmod/ulab/code/numpy/vector/vector.c
3780+
#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare.c
3781+
#: extmod/ulab/code/numpy/vector.c
37753782
msgid "operands could not be broadcast together"
37763783
msgstr ""
37773784

3785+
#: extmod/ulab/code/numpy/linalg/linalg.c
3786+
msgid "operation is defined for 2D arrays only"
3787+
msgstr ""
3788+
3789+
#: extmod/ulab/code/numpy/linalg/linalg.c
3790+
msgid "operation is defined for ndarrays only"
3791+
msgstr ""
3792+
37783793
#: extmod/ulab/code/ndarray.c
37793794
msgid "operation is implemented for 1D Boolean arrays only"
37803795
msgstr ""
37813796

3782-
#: extmod/ulab/code/numpy/numerical/numerical.c
3797+
#: extmod/ulab/code/numpy/numerical.c
37833798
msgid "operation is not implemented on ndarrays"
37843799
msgstr ""
37853800

@@ -3971,7 +3986,7 @@ msgstr ""
39713986
msgid "rgb_pins[%d] is not on the same port as clock"
39723987
msgstr ""
39733988

3974-
#: extmod/ulab/code/numpy/numerical/numerical.c
3989+
#: extmod/ulab/code/numpy/numerical.c
39753990
msgid "roll argument must be an ndarray"
39763991
msgstr ""
39773992

@@ -4050,7 +4065,7 @@ msgstr ""
40504065
msgid "soft reboot\n"
40514066
msgstr ""
40524067

4053-
#: extmod/ulab/code/numpy/numerical/numerical.c
4068+
#: extmod/ulab/code/numpy/numerical.c
40544069
msgid "sort argument must be an ndarray"
40554070
msgstr ""
40564071

@@ -4197,11 +4212,11 @@ msgstr ""
41974212
msgid "too many values to unpack (expected %d)"
41984213
msgstr ""
41994214

4200-
#: extmod/ulab/code/numpy/approx/approx.c
4215+
#: extmod/ulab/code/numpy/approx.c
42014216
msgid "trapz is defined for 1D arrays of equal length"
42024217
msgstr ""
42034218

4204-
#: extmod/ulab/code/numpy/approx/approx.c
4219+
#: extmod/ulab/code/numpy/approx.c
42054220
msgid "trapz is defined for 1D iterables"
42064221
msgstr ""
42074222

@@ -4364,16 +4379,15 @@ msgstr ""
43644379
msgid "window must be <= interval"
43654380
msgstr ""
43664381

4367-
#: extmod/ulab/code/numpy/numerical/numerical.c
4382+
#: extmod/ulab/code/numpy/numerical.c
43684383
msgid "wrong axis index"
43694384
msgstr ""
43704385

43714386
#: extmod/ulab/code/ulab_create.c
43724387
msgid "wrong axis specified"
43734388
msgstr ""
43744389

4375-
#: extmod/ulab/code/numpy/compare/compare.c
4376-
#: extmod/ulab/code/numpy/vector/vector.c
4390+
#: extmod/ulab/code/numpy/compare.c extmod/ulab/code/numpy/vector.c
43774391
msgid "wrong input type"
43784392
msgstr ""
43794393

@@ -4385,7 +4399,7 @@ msgstr ""
43854399
msgid "wrong number of values to unpack"
43864400
msgstr ""
43874401

4388-
#: extmod/ulab/code/numpy/vector/vector.c
4402+
#: extmod/ulab/code/numpy/vector.c
43894403
msgid "wrong output type"
43904404
msgstr ""
43914405

shared-bindings/_typing/__init__.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,30 @@ import audiocore
1010
import audiomixer
1111
import audiomp3
1212
import rgbmatrix
13-
import ulab
13+
import ulab.numpy
1414

1515
ReadableBuffer = Union[
16-
bytes, bytearray, memoryview, array.array, ulab.ndarray, rgbmatrix.RGBMatrix
16+
bytes, bytearray, memoryview, array.array, ulab.numpy.ndarray, rgbmatrix.RGBMatrix
1717
]
1818
"""Classes that implement the readable buffer protocol
1919
2020
- `bytes`
2121
- `bytearray`
2222
- `memoryview`
2323
- `array.array`
24-
- `ulab.ndarray`
24+
- `ulab.numpy.ndarray`
2525
- `rgbmatrix.RGBMatrix`
2626
"""
2727

2828
WriteableBuffer = Union[
29-
bytearray, memoryview, array.array, ulab.ndarray, rgbmatrix.RGBMatrix
29+
bytearray, memoryview, array.array, ulab.numpy.ndarray, rgbmatrix.RGBMatrix
3030
]
3131
"""Classes that implement the writeable buffer protocol
3232
3333
- `bytearray`
3434
- `memoryview`
3535
- `array.array`
36-
- `ulab.ndarray`
36+
- `ulab.numpy.ndarray`
3737
- `rgbmatrix.RGBMatrix`
3838
"""
3939

tools/extract_pyi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
IMPORTS_TYPING = frozenset(
4040
{
4141
"Any",
42+
"Dict",
4243
"Optional",
4344
"Union",
4445
"Tuple",

0 commit comments

Comments
 (0)