np.clip()函数用法
2018-07-04 14:47
302 查看
import numpy as np x=np.array([1,2,3,5,6,7,8,9]) np.clip(x,3,8) Out[88]: array([3, 3, 3, 5, 6, 7, 8, 8])
x=np.array([[1,2,3,5,6,7,8,9],[1,2,3,5,6,7,8,9]]) np.clip(x,3,8) Out[90]: array([[3, 3, 3, 5, 6, 7, 8, 8], [3, 3, 3, 5, 6, 7, 8, 8]])
阅读更多
相关文章推荐
- tensorflow学习笔记(2):tf.clip_by_value,tf.expand_dims等函数的用法
- np.clip()的用法
- list,tuple和numpy中nparray及np.hstack(),np.vstack(),np.stack()函数关系及用法解析
- python中List的sort方法(或者sorted内建函数)的用法
- AnimateWindow函数用法
- string中c_str()、data()、copy(p,n)函数的用法
- python中List的sort方法(或者sorted内建函数)的用法
- c语言中rand()函数的用法笔记
- Oracle 中 decode 函数用法
- getopt()函数用法
- jQuery中attr()与prop()函数用法实例详解(附用法区别)
- PHP中error_reporting()函数的用法(PHP报错级别)
- oracle trunc()函数用法
- RIO的带有缓冲区函数的用法
- Oracle trunc()函数的用法
- c++ substr()和assign()函数用法
- assert()函数用法总结
- java中Collections.sort() 排序函数的用法
- 在sql stuff 函数用法
- jQuery.extend 函数各种用法