lisa's blog

Fantastic Magic World!


  • About

  • Archives

  • Categories

  • Tags

  • Books

  • Video

  • Game

  • Search

numpy 100题练习 Day5

Posted on 2019-05-24 | In 数据科学

https://github.com/rougier/numpy-100 How to sum a small array faster than np.sum?# Author: Evgeni BurovskiZ = np.arange(10)np.add.reduce(Z) Consider ...

Read more »

numpy 100题练习 Day4

Posted on 2019-05-24 | In 数据科学

https://github.com/rougier/numpy-100 How to ignore all numpy warnings (not recommended)?# Suicide mode ondefaults = np.seterr(all="ignore")Z = np.on ...

Read more »

numpy 100题练习 Day3

Posted on 2019-05-24 | In 数据科学

https://github.com/rougier/numpy-100 Create a checkerboard 8x8 matrix using the tile functionZ = np.tile( np.array([[0,1],[1,0]]), (4,4))print(Z)[[0 ...

Read more »

numpy 100题练习 Day2

Posted on 2019-05-24 | Edited on 2019-05-28 | In 数据科学

https://github.com/rougier/numpy-100 Create a 3x3 identity matrix创建一个3x3的矩阵,返回一个对角线是1,其余是0的数组。 np.eye(N),N行。 Z = np.eye(3)print(Z)>>> [[1. ...

Read more »

numpy 100题练习 Day1

Posted on 2019-05-24 | Edited on 2019-05-28 | In 数据科学

https://github.com/rougier/numpy-100 Import the numpy package under the name np使用import语句导入numpy,别名为np。 import numpy as np Print the numpy version a ...

Read more »

读书笔记 numpy入门 第7章 花式索引

Posted on 2019-05-24 | In 数据科学

https://github.com/jakevdp/PythonDataScienceHandbook https://www.numpy.org.cn Fancy indexing作用-获取数组中特定元素快速获得并修改复杂的数组值得子数据集。 传递的是索引数组,而不是单个标量。 单个维度im ...

Read more »

读书笔记 numpy入门 第5章 广播

Posted on 2019-05-24 | In 数据科学

https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html https://github.com/jakevdp/PythonDataScienceHandbook 广播 Broadcasting执行算术运算时使用不同形状的数组 ...

Read more »

读书笔记 numpy入门 第3章 聚合函数

Posted on 2019-05-23 | Edited on 2019-05-24 | In 数据科学

函数名称 NaN安全版本 描述 np.sum np.nansum 计算元素的和 np.prod np.nanprod 计算元素的积 np.mean np.nanmean 计算元素的平均值 np.std np.nanstd 计算元素的标准差 np.var np.nanva ...

Read more »

读书笔记 numpy入门 第3章 算术运算符

Posted on 2019-05-23 | Edited on 2019-05-24 | In 数据科学

运算符 对应的通用函数 描述 + np.add 加法运算(即 1 + 1 = 2) - np.subtract 减法运算(即 3 - 2 = 1) - np.negative 负数运算( 即 -2) * np.multiply 乘法运算(即 2 \* 3 = 6) / ...

Read more »

读书笔记 numpy入门 第2章 数组分裂

Posted on 2019-05-23 | In 数据科学

np.splitSplit an array into multiple sub-arrays 向以上函数传递一个索引列表作为参数,索引列表记录的是分裂点位置: x = [1, 2, 3, 99, 99, 3, 2, 1]x1, x2, x3 = np.split(x, [3, 5])print(x ...

Read more »
123…5
lisa Zen

lisa Zen

45 posts
6 categories
28 tags
GitHub Weibo

Tag Cloud

  • Github1
  • Immutable1
  • NextT1
  • React1
  • Redux1
  • WIN101
  • blog1
  • chrome1
  • data science29
  • hexo2
  • jupyter1
  • jupyter notebook1
  • logo制作1
  • matplotlib1
  • numpy27
  • pandas1
  • python31
  • theme1
  • vs code1
  • win102
  • 主题2
  • 前端1
  • 博客1
  • 快捷键2
  • 数据科学19
  • 赛博朋克1
  • 霓虹1
  • 页面游戏1
© 2019 lisa Zen
Powered by Hexo v3.8.0
|
Theme – NexT.Gemini v7.1.1