Get help information for an array, function, class, or module. Parameters ---------- object : object or str, optional Input object or name to get information about. If `object` is an `ndarray` instance, information about the array is printed. If `object` is
(object=None, maxwidth=76, output=None, toplevel='numpy')
| 527 | |
| 528 | @set_module('numpy') |
| 529 | def info(object=None, maxwidth=76, output=None, toplevel='numpy'): |
| 530 | """ |
| 531 | Get help information for an array, function, class, or module. |
| 532 | |
| 533 | Parameters |
| 534 | ---------- |
| 535 | object : object or str, optional |
| 536 | Input object or name to get information about. If `object` is |
| 537 | an `ndarray` instance, information about the array is printed. |
| 538 | If `object` is a numpy object, its docstring is given. If it is |
| 539 | a string, available modules are searched for matching objects. |
| 540 | If None, information about `info` itself is returned. |
| 541 | maxwidth : int, optional |
| 542 | Printing width. |
| 543 | output : file like object, optional |
| 544 | File like object that the output is written to, default is |
| 545 | ``None``, in which case ``sys.stdout`` will be used. |
| 546 | The object has to be opened in 'w' or 'a' mode. |
| 547 | toplevel : str, optional |
| 548 | Start search at this level. |
| 549 | |
| 550 | See Also |
| 551 | -------- |
| 552 | source, lookfor |
| 553 | |
| 554 | Notes |
| 555 | ----- |
| 556 | When used interactively with an object, ``np.info(obj)`` is equivalent |
| 557 | to ``help(obj)`` on the Python prompt or ``obj?`` on the IPython |
| 558 | prompt. |
| 559 | |
| 560 | Examples |
| 561 | -------- |
| 562 | >>> np.info(np.polyval) # doctest: +SKIP |
| 563 | polyval(p, x) |
| 564 | Evaluate the polynomial p at x. |
| 565 | ... |
| 566 | |
| 567 | When using a string for `object` it is possible to get multiple results. |
| 568 | |
| 569 | >>> np.info('fft') # doctest: +SKIP |
| 570 | *** Found in numpy *** |
| 571 | Core FFT routines |
| 572 | ... |
| 573 | *** Found in numpy.fft *** |
| 574 | fft(a, n=None, axis=-1) |
| 575 | ... |
| 576 | *** Repeat reference found in numpy.fft.fftpack *** |
| 577 | *** Total of 3 references found. *** |
| 578 | |
| 579 | When the argument is an array, information about the array is printed. |
| 580 | |
| 581 | >>> a = np.array([[1 + 2j, 3, -4], [-5j, 6, 0]], dtype=np.complex64) |
| 582 | >>> np.info(a) |
| 583 | class: ndarray |
| 584 | shape: (2, 3) |
| 585 | strides: (24, 8) |
| 586 | itemsize: 8 |
nothing calls this directly
no test coverage detected