美文网首页
jupyter实用tips

jupyter实用tips

作者: 1037号森林里一段干木头 | 来源:发表于2020-08-19 21:49 被阅读0次
numpy lookfor()函数,查询函数文档,且不限于numpy模块

import numpy as np
np.lookfor("average")
Search results for 'average'
----------------------------
numpy.average
    Compute the weighted average along the specified axis.
numpy.mean
    Compute the arithmetic mean along the specified axis.
numpy.nanmean
    Compute the arithmetic mean along the specified axis, ignoring NaNs.
numpy.ma.average
    Return the weighted average of array over the given axis.
numpy.ma.mean
    Returns the average of the array elements along given axis.
numpy.matrix.mean
    Returns the average of the matrix elements along the given axis.
numpy.chararray.mean
    Returns the average of the array elements along given axis.
numpy.ma.MaskedArray.mean
    Returns the average of the array elements along given axis.
numpy.cov
    Estimate a covariance matrix, given data and weights.
numpy.irr
    Return the Internal Rate of Return (IRR).
numpy.std
    Compute the standard deviation along the specified axis.
numpy.sum
    Sum of array elements over a given axis.
numpy.var
    Compute the variance along the specified axis.
numpy.sort
    Return a sorted copy of an array.
numpy.median
    Compute the median along the specified axis.
numpy.nanstd
    Compute the standard deviation along the specified axis, while
numpy.nanvar
    Compute the variance along the specified axis, while ignoring NaNs.
numpy.nanmedian
    Compute the median along the specified axis, while ignoring NaNs.
numpy.partition
    Return a partitioned copy of an array.
numpy.ma.var
    Compute the variance along the specified axis.
numpy.apply_along_axis
    Apply a function to 1-D slices along the given axis.
numpy.ma.apply_along_axis
    Apply a function to 1-D slices along the given axis.
numpy.ma.MaskedArray.var
    Compute the variance along the specified axis.
numpy.random.PCG64.advance
    advance(delta)
numpy.random.Philox.advance
    advance(delta)
numpy.random.Generator.dirichlet
    Draw samples from the Dirichlet distribution.
numpy.random.RandomState.dirichlet
    Draw samples from the Dirichlet distribution.
numpy.random.Generator.multivariate_normal
    Draw random samples from a multivariate normal distribution.
numpy.random.RandomState.multivariate_normal
    Draw random samples from a multivariate normal distribution.

jupyter 的特殊功能:将光标移到函数末尾,shift+tab可以查看函数文档,再次shift+tab显示更详细的内容

例如下面:
np.max()

Signature:
np.max(
    a,
    axis=None,
    out=None,
    keepdims=<no value>,
    initial=<no value>,
    where=<no value>,
)
Docstring:
Return the maximum of an array or maximum along an axis.

Parameters
----------
a : array_like
    Input data.
axis : None or int or tuple of ints, optional
    Axis or axes along which to operate.  By default, flattened input is
    used.

    .. versionadded:: 1.7.0

    If this is a tuple of ints, the maximum is selected over multiple axes,
    instead of a single axis or all the axes as before.
out : ndarray, optional
    Alternative output array in which to place the result.  Must
    be of the same shape and buffer length as the expected output.
    See `ufuncs-output-type` for more details.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the `amax` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.

批量注释,取消:选中要注释的段落后 ctr+/
批量右移:tab
批量左移:shift+tab


相关文章

  • jupyter实用tips

    jupyter 的特殊功能:将光标移到函数末尾,shift+tab可以查看函数文档,再次shift+tab显示更详...

  • Jupyter notebook Tips

    修改关联的浏览器jupyter notebook --generate-configC:\Users\Lynn.j...

  • Jupyter Notebook扩展插件

    原文:top 5:五大最实用的Jupyter Notebook扩展插件 安装Jupyter NbExtension...

  • 实用Tips

    在工作学习过程中,曾遇到一些问题,为了便于下次查找,有必要进行整理。 Git Bash修改默认打开之后的路径 在“...

  • 活络一下jupyter lab/notebook

    笔记内容:jupyter lab/notebook上的一些实用(或者不实用)的扩展or工具 jupyterlab-...

  • jupyter notebook 修改编辑页面式样

    jupyter notebook 是一款非常实用的编辑器。不过原生的字体太丑了,这里记录一下jupyter not...

  • 出游,你该知道的

    出游tips: 有了出游的想法,尽早去搜集相关信息包括: 男女实用tips: (一)目的地天气,衣服(舒适,包括睡...

  • iOS - 实用Tips

    一、后台有媒体播放器时: 当其他应用程序占用媒体播放器时,不能影响到后台的媒体音乐播放;当你的应用程序中有相机要拍...

  • Swift实用Tips

    这篇文章来记录下Swift开发get到的点,虽然简单,但很实用。 1.扩展UserDefaults加属性,使用ge...

  • Scala 实用 Tips

    1.多条件过滤 使用尾递归的形式对给定值和多个 filter 条件来进行过滤,只要满足其一,即可返回 true 尾...

网友评论

      本文标题:jupyter实用tips

      本文链接:https://www.haomeiwen.com/subject/wxmykktx.html