常用的Numpy通用函数列表
官网来源:Universal functions (ufunc) — NumPy v1.21 Manual
数学运算(Math operations)
| 表达式 | 定义 | 
|---|---|
add(x1, x2, /[, out, where, casting, order, …]) | 
Add arguments element-wise. | 
subtract(x1, x2, /[, out, where, casting, …]) | 
Subtract arguments, element-wise. | 
multiply(x1, x2, /[, out, where, casting, …]) | 
Multiply arguments element-wise. | 
matmul(x1, x2, /[, out, casting, order, …]) | 
Matrix product of two arrays. | 
divide(x1, x2, /[, out, where, casting, …]) | 
Returns a true division of the inputs, element-wise. | 
logaddexp(x1, x2, /[, out, where, casting, …]) | 
Logarithm of the sum of exponentiations of the inputs. | 
logaddexp2(x1, x2, /[, out, where, casting, …]) | 
Logarithm of the sum of exponentiations of the inputs in base-2. | 
true_divide(x1, x2, /[, out, where, …]) | 
Returns a true division of the inputs, element-wise. | 
floor_divide(x1, x2, /[, out, where, …]) | 
Return the largest integer smaller or equal to the division of the inputs. | 
negative(x, /[, out, where, casting, order, …]) | 
Numerical negative, element-wise. | 
positive(x, /[, out, where, casting, order, …]) | 
Numerical positive, element-wise. | 
power(x1, x2, /[, out, where, casting, …]) | 
First array elements raised to powers from second array, element-wise. | 
float_power(x1, x2, /[, out, where, …]) | 
First array elements raised to powers from second array, element-wise. | 
remainder(x1, x2, /[, out, where, casting, …]) | 
Return element-wise remainder of division. | 
mod(x1, x2, /[, out, where, casting, order, …]) | 
Return element-wise remainder of division. | 
fmod(x1, x2, /[, out, where, casting, …]) | 
Return the element-wise remainder of division. | 
divmod(x1, x2[, out1, out2], / [[, out, …]) | 
Return element-wise quotient and remainder simultaneously. | 
absolute(x, /[, out, where, casting, order, …]) | 
Calculate the absolute value element-wise. | 
fabs(x, /[, out, where, casting, order, …]) | 
Compute the absolute values element-wise. | 
rint(x, /[, out, where, casting, order, …]) | 
Round elements of the array to the nearest integer. | 
sign(x, /[, out, where, casting, order, …]) | 
Returns an element-wise indication of the sign of a number. | 
heaviside(x1, x2, /[, out, where, casting, …]) | 
Compute the Heaviside step function. | 
conj(x, /[, out, where, casting, order, …]) | 
Return the complex conjugate, element-wise. | 
conjugate(x, /[, out, where, casting, …]) | 
Return the complex conjugate, element-wise. | 
exp(x, /[, out, where, casting, order, …]) | 
Calculate the exponential of all elements in the input array. | 
exp2(x, /[, out, where, casting, order, …]) | 
Calculate 2**p for all p in the input array. | 
log(x, /[, out, where, casting, order, …]) | 
Natural logarithm, element-wise. | 
log2(x, /[, out, where, casting, order, …]) | 
Base-2 logarithm of x. | 
log10(x, /[, out, where, casting, order, …]) | 
Return the base 10 logarithm of the input array, element-wise. | 
expm1(x, /[, out, where, casting, order, …]) | 
Calculate exp(x) - 1 for all elements in the array. | 
log1p(x, /[, out, where, casting, order, …]) | 
Return the natural logarithm of one plus the input array, element-wise. | 
sqrt(x, /[, out, where, casting, order, …]) | 
Return the non-negative square-root of an array, element-wise. | 
square(x, /[, out, where, casting, order, …]) | 
Return the element-wise square of the input. | 
cbrt(x, /[, out, where, casting, order, …]) | 
Return the cube-root of an array, element-wise. | 
reciprocal(x, /[, out, where, casting, …]) | 
Return the reciprocal of the argument, element-wise. | 
gcd(x1, x2, /[, out, where, casting, order, …]) | 
Returns the greatest common divisor of ` | 
lcm(x1, x2, /[, out, where, casting, order, …]) | 
Returns the lowest common multiple of ` | 
三角函数(Trigonometric functions)
All trigonometric functions use radians when an angle is called for. The ratio of degrees to radians is 180∘/π.
| 表达式 | 定义 | 
|---|---|
sin(x, /[, out, where, casting, order, …]) | 
Trigonometric sine, element-wise. | 
cos(x, /[, out, where, casting, order, …]) | 
Cosine element-wise. | 
tan(x, /[, out, where, casting, order, …]) | 
Compute tangent element-wise. | 
arcsin(x, /[, out, where, casting, order, …]) | 
Inverse sine, element-wise. | 
arccos(x, /[, out, where, casting, order, …]) | 
Trigonometric inverse cosine, element-wise. | 
arctan(x, /[, out, where, casting, order, …]) | 
Trigonometric inverse tangent, element-wise. | 
arctan2(x1, x2, /[, out, where, casting, …]) | 
Element-wise arc tangent of x1/x2 choosing the quadrant correctly. | 
hypot(x1, x2, /[, out, where, casting, …]) | 
Given the “legs” of a right triangle, return its hypotenuse. | 
sinh(x, /[, out, where, casting, order, …]) | 
Hyperbolic sine, element-wise. | 
cosh(x, /[, out, where, casting, order, …]) | 
Hyperbolic cosine, element-wise. | 
tanh(x, /[, out, where, casting, order, …]) | 
Compute hyperbolic tangent element-wise. | 
arcsinh(x, /[, out, where, casting, order, …]) | 
Inverse hyperbolic sine element-wise. | 
arccosh(x, /[, out, where, casting, order, …]) | 
Inverse hyperbolic cosine, element-wise. | 
arctanh(x, /[, out, where, casting, order, …]) | 
Inverse hyperbolic tangent element-wise. | 
degrees(x, /[, out, where, casting, order, …]) | 
Convert angles from radians to degrees. | 
radians(x, /[, out, where, casting, order, …]) | 
Convert angles from degrees to radians. | 
deg2rad(x, /[, out, where, casting, order, …]) | 
Convert angles from degrees to radians. | 
rad2deg(x, /[, out, where, casting, order, …]) | 
Convert angles from radians to degrees. | 
逻辑函数(Comparison functions)
Warning
Do not use the Python keywords and and or to combine logical array expressions. These keywords will test the truth value of the entire array (not element-by-element as you might expect). Use the bitwise operators & and | instead.
| 表达式 | 定义 | 
|---|---|
greater(x1, x2, /[, out, where, casting, …]) | 
Return the truth value of (x1 > x2) element-wise. | 
greater_equal(x1, x2, /[, out, where, …]) | 
Return the truth value of (x1 >= x2) element-wise. | 
less(x1, x2, /[, out, where, casting, …]) | 
Return the truth value of (x1 < x2) element-wise. | 
less_equal(x1, x2, /[, out, where, casting, …]) | 
Return the truth value of (x1 <= x2) element-wise. | 
not_equal(x1, x2, /[, out, where, casting, …]) | 
Return (x1 != x2) element-wise. | 
equal(x1, x2, /[, out, where, casting, …]) | 
Return (x1 == x2) element-wise. | 
logical_and(x1, x2, /[, out, where, …]) | 
Compute the truth value of x1 AND x2 element-wise. | 
logical_or(x1, x2, /[, out, where, casting, …]) | 
Compute the truth value of x1 OR x2 element-wise. | 
logical_xor(x1, x2, /[, out, where, …]) | 
Compute the truth value of x1 XOR x2, element-wise. | 
logical_not(x, /[, out, where, casting, …]) | 
Compute the truth value of NOT x element-wise. | 
maximum(x1, x2, /[, out, where, casting, …]) | 
Element-wise maximum of array elements. | 
minimum(x1, x2, /[, out, where, casting, …]) | 
Element-wise minimum of array elements. | 
fmax(x1, x2, /[, out, where, casting, …]) | 
Element-wise maximum of array elements. | 
fmin(x1, x2, /[, out, where, casting, …]) | 
Element-wise minimum of array elements. | 
常用的Numpy通用函数列表的更多相关文章
- 常用的CSS属性列表汇总
		
常用的CSS属性列表汇总 近期教学给学员总结常用的CSS属性,方便学习查询,正好发上来也给大家分享一下. 表格最右列的数字标识支持的CSS最低版本. 01. CSS背景属性(Background) 属 ...
 - amazeui学习笔记--css(常用组件8)--列表list
		
amazeui学习笔记--css(常用组件8)--列表list 一.总结 1.链接列表:就是多个链接在一起组成的列表, 使用 <ul> 结构嵌套链接列表,添加 .am-list.还是ui包 ...
 - python常用库 - NumPy 和 sklearn入门
		
Numpy 和 scikit-learn 都是python常用的第三方库.numpy库可以用来存储和处理大型矩阵,并且在一定程度上弥补了python在运算效率上的不足,正是因为numpy的存在使得py ...
 - Numpy 通用函数
		
frompyfunc的调用格式为frompyfunc(func, nin, nout),其中func是计算单个元素的函数,nin是此函数的输入参数的个数,nout是此函数的返回值的个数 # 注:用fr ...
 - 数据分析常用库(numpy,pandas,matplotlib,scipy)
		
概述 numpy numpy(numeric python)是 python 的一个开源数值计算库,主要用于数组和矩阵计算.底层是 C 语言,运行效率远高于纯 python 代码.numpy主要包含2 ...
 - MFC编程入门之二十四(常用控件:列表框控件ListBox)
		
前面两节讲了比较常用的按钮控件,并通过按钮控件实例说明了具体用法.本文要讲的是列表框控件(ListBox)及其使用实例. 列表框控件简介 列表框给出了一个选项清单,允许用户从中进行单项或多项选择,被选 ...
 - C#记录日志、获取枚举值 等通用函数列表
		
) { ] >= && ipvals[] <= && ipval ...
 - 整理 W3CSchool 常用的CSS属性列表
		
近期教学给学员总结常用的CSS属性,方便学习查询,正好发上来也给大家分享一下,O(∩_∩)O. 摘选自:http://www.w3cschool.com.cn/ 表格最右列的数字标识支持的CSS最低版 ...
 - numpy通用函数
		
numpy的通用函数可以对数组进行向量化操作,可以提高数组元素的重复计算的效率. 一.numpy的算数运算符都是对python内置符的封装 算数运算符 >>> import nump ...
 - Android开发常用的一些功能列表(转)
		
文章来源:http://www.cnblogs.com/netsql/archive/2013/03/02/2939828.html 1.软件自动更新下载,并提示 2.软件登录注册,以及状态保存 3. ...
 
随机推荐
- 合并区间(区间排序,vector的动态扩容的应用)
			
以数组 intervals 表示若干个区间的集合,其中单个区间为 intervals[i] = [starti, endi] .请你合并所有重叠的区间,并返回一个不重叠的区间数组,该数组需恰好覆盖输入 ...
 - 【LeetCode剑指offer 03】合并两个/K个排序链表
			
合并两个排序链表 https://leetcode.cn/problems/he-bing-liang-ge-pai-xu-de-lian-biao-lcof 输入两个递增排序的链表,合并这两个链表并 ...
 - SSH不对称密钥自动登入服务器
			
SSH不对称密钥自动登入服务器 1.先在自己的电脑上创建密钥对 ssh-keygen -t rsa Windows下生成SSH密钥 $ ssh-keygen -t rsa -C "youre ...
 - Java纯手打web服务器(三)
			
概要:考虑到上一篇中的request和response对象的安全性,不允许servlt程序员在service方法中把servletRequest和servletResponse对象进行强转reques ...
 - 逆向实战32——某东最新h5st4.4算法分析
			
前言 本文章中所有内容仅供学习交流,抓包内容.敏感网址.数据接口均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关,若有侵权,请联系我立即删除! 目标网站 aHR0cHM6 ...
 - 【Azure 环境】Azure CLI 获取Access Token的脚本实例
			
问题描述 如何使用azure CLI命令获取到中国区的Access Token呢? 问题解答 首先,需要通过 az cloud set --name AzureChinaCloud 来设置登录中国区的 ...
 - 【Azure 应用服务】App Service 配置 Application Settings 访问Storage Account得到 could not be resolved: '*.file.core.windows.net'的报错。没有解析成对应中国区 Storage Account地址 *.file.core.chinacloudapi.cn
			
问题描述 App Service 配置 Application Settings 访问Storage Account.如下: { "name": "WEBSITE_CON ...
 - 【Azure 应用服务】使用命令行创建 webapp 应用出现命令语法不正确错误
			
问题描述 根据Azure App Service 入门文档 "快速入门:在 Linux 上的 Azure 应用服务中创建 Python 应用" 在创建App Service应用时候 ...
 - Codeforces Round 916 (Div. 3)(A~E2)
			
A 统计一下每个字母的出现次数然后输出即可 #include <bits/stdc++.h> #define rep(i,a,b) for(register int i = (a); i ...
 - 恒玄科技BES250解决方案之双耳链接调试总结和源码分析
			
一 前言 bes2500芯片在tws耳机应用十分广泛,该芯片有着资源强大,音质好,大厂背书等特色.吸引了不少粉丝跟随. 最近在调试该芯片的tws配对流程,花费了一些时间,踩了一些坑,这里做一个总结和备 ...