@@ -33,9 +33,13 @@ ulab.array -- 1- and 2- dimensional array
33
33
:param sequence values: Sequence giving the initial content of the array.
34
34
:param dtype: The type of array values, ``int8 ``, ``uint8 ``, ``int16 ``, ``uint16 ``, or ``float ``
35
35
36
- The `values ` sequence can either be a sequence of numbers (in which case a
37
- 1-dimensional array is created), or a sequence where each subsequence has
38
- the same length (in which case a 2-dimensional array is created).
36
+ The `values ` sequence can either be another ~ulab.array, sequence of numbers
37
+ (in which case a 1-dimensional array is created), or a sequence where each
38
+ subsequence has the same length (in which case a 2-dimensional array is
39
+ created).
40
+
41
+ Passing a ~ulab.array and a different dtype can be used to convert an array
42
+ from one dtype to another.
39
43
40
44
In many cases, it is more convenient to create an array from a function
41
45
like `zeros ` or `linspace `.
@@ -209,9 +213,20 @@ much more efficient than expressing the same operation as a Python loop.
209
213
210
214
Computes the inverse hyperbolic sine function
211
215
216
+ .. method :: around(a, \*, decimals)
217
+
218
+ Returns a new float array in which each element is rounded to
219
+ ``decimals `` places.
220
+
212
221
.. method :: atan
213
222
214
- Computes the inverse tangent function
223
+ Computes the inverse tangent function; the return values are in the
224
+ range [-pi/2,pi/2].
225
+
226
+ .. method :: atan2(y,x)
227
+
228
+ Computes the inverse tangent function of y/x; the return values are in
229
+ the range [-pi, pi].
215
230
216
231
.. method :: atanh
217
232
@@ -290,6 +305,14 @@ much more efficient than expressing the same operation as a Python loop.
290
305
291
306
.. module :: ulab.linalg
292
307
308
+ .. method :: cholesky(A)
309
+
310
+ :param ~ulab.array A: a positive definite, symmetric square matrix
311
+ :return ~ulab.array L: a square root matrix in the lower triangular form
312
+ :raises ValueError: If the input does not fulfill the necessary conditions
313
+
314
+ The returned matrix satisfies the equation m=LL*
315
+
293
316
.. method :: det
294
317
295
318
:param: m, a square matrix
@@ -360,6 +383,9 @@ much more efficient than expressing the same operation as a Python loop.
360
383
361
384
Perform a Fast Fourier Transform from the time domain into the frequency domain
362
385
386
+ See also ~ulab.extras.spectrogram, which computes the magnitude of the fft,
387
+ rather than separately returning its real and imaginary parts.
388
+
363
389
.. method :: ifft(r, c=None)
364
390
365
391
:param ulab.array r: A 1-dimension array of values whose size is a power of 2
@@ -368,12 +394,6 @@ much more efficient than expressing the same operation as a Python loop.
368
394
369
395
Perform an Inverse Fast Fourier Transform from the frequeny domain into the time domain
370
396
371
- .. method :: spectrum(r):
372
-
373
- :param ulab.array r: A 1-dimension array of values whose size is a power of 2
374
-
375
- Computes the spectrum of the input signal. This is the absolute value of the (complex-valued) fft of the signal.
376
-
377
397
:mod: `ulab.numerical ` --- Numerical and Statistical functions
378
398
=============================================================
379
399
@@ -448,3 +468,14 @@ operate over the flattened array (None), rows (0), or columns (1).
448
468
.. method :: polyval(p, x)
449
469
450
470
Evaluate the polynomial p at the points x. x must be an array.
471
+
472
+ :mod: `ulab.extras ` --- Additional functions not in numpy
473
+ ========================================================
474
+
475
+ .. method :: spectrum(r):
476
+
477
+ :param ulab.array r: A 1-dimension array of values whose size is a power of 2
478
+
479
+ Computes the spectrum of the input signal. This is the absolute value of the (complex-valued) fft of the signal.
480
+
481
+ This function is similar to scipy's ``scipy.signal.spectrogram ``.
0 commit comments