zoukankan      html  css  js  c++  java
  • NumPy array statistical methods and sorting

    原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/12247717.html

    Basic array statistical methods

    A set of mathematical functions that compute statistics about an entire array or about the data along an axis are accessible as methods of the array class.

    You can use aggregations(often called reductions) like sum, mean, and std (standard deviation) either by calling the array instance method or using the top-level NumPy function.

    Functions like mean, sum, max and min take an optional axis argument that computes the statistic over the given axis, resulting in an array with one fewer dimension

    Other methods like cumsum and cumprod do not aggregate, instead producing an array of the intermediate results. In multidimensional arrays, accumulation functions like cumsum return an array of the same size, but with the partial aggregates computed along the indicated axis according to each lower dimensional slice.

    Sorting

    Like Python’s built-in list type, NumPy arrays can be sorted in-place with the sort method. You can also sort each one-dimensional section of values in a multidimensional array inplace along an axis by passing the axis number to sort.

    Reference

    Python for Data Analysis Second Edition

  • 相关阅读:
    MySQL主主同步方案
    Mysql增量备份与恢复
    配置合适的存储引擎
    基于Amoeba读写分离
    部署myaql主从异步复制
    MySQL完全备份操作
    echo 命令详解
    ELK 基本部署
    zabbix 简介
    基于 Git Tag 发布及回滚代码
  • 原文地址:https://www.cnblogs.com/agilestyle/p/12247717.html
Copyright © 2011-2022 走看看