numpy
treeHash
这个作者很懒,什么都没留下…
展开
-
Numpy-day01
numpy.tile(A, reps) 该函数返回一个ndarray数组 通过参数A的长度和reps的长度决定输出什么类型的数组 >>> from numpy import * >>> list_v = [1,2,3,4,5] >>> tile(list_v,1) array([1, 2, 3, 4, 5]) >>> tile(list_v,10) array([1, 2, 3原创 2017-01-18 11:22:43 · 222 阅读 · 0 评论 -
numpyday02
numpy.zeros(shape, dtype=float, order=’C’) Return a new array of given shape and type, filled with zeros. 返回一个新的numpy的数组,并且值为0 >>>import numpy as np >>> np.zeros(10) array([ 0., 0., 0.,原创 2017-01-19 10:58:40 · 190 阅读 · 0 评论 -
ml-day03
An ndarray is a (usually fixed-size) multidimensional container of items of the same type and size. The number of dimensions and items in an array is defined by its shape, which is a tuple of N posit原创 2017-01-20 10:16:18 · 171 阅读 · 0 评论 -
numpy-索引
1.numpy中的多维数组和普通的python数组都是从0开始索引。 2.numpy中多维数组第一个值是该数组的列 3.多维数组是一个n列m行的矩阵(shape) >>> import numpy as np >>> x = np.array([[1,2,3], [4,5,6]]) >>> x[1,2] 6 >>> x[1] array([4, 5, 6]) >>> x[2,2]原创 2017-01-24 10:44:06 · 308 阅读 · 0 评论 -
numpy的基础知识
基础在numpy中dimensions(纬度)被称为axes(轴),轴的个数又被称为rank,轴又被称为shapendarray.ndimthe number of axes (dimensions) of the array. In the Python world, the number of dimensions is referred to asrank.数组的维度的个数。ndarray.原创 2017-04-30 01:09:11 · 425 阅读 · 0 评论