소스 검색

Updated Python 3.5.1

Valerio Maggio 9 년 전
부모
커밋
e6bd02dd70
5개의 변경된 파일44개의 추가작업 그리고 23개의 파일을 삭제
  1. 40 8
      02_0_Introduction to Numpy.ipynb
  2. 1 1
      02_1_Indexing and Slicing.ipynb
  3. 1 1
      03_Numpy_Operations.ipynb
  4. 1 1
      04_Data_Processing.ipynb
  5. 1 12
      07_1_Sparse_Matrices.ipynb

+ 40 - 8
02_0_Introduction to Numpy.ipynb

@@ -1169,7 +1169,18 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 51,
+   "execution_count": 2,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "import numpy as np"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
    "metadata": {
     "collapsed": true,
     "slideshow": {
@@ -1183,7 +1194,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 52,
+   "execution_count": 4,
    "metadata": {
     "collapsed": false,
     "slideshow": {
@@ -1195,7 +1206,7 @@
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "1000 loops, best of 3: 558 µs per loop\n"
+      "1000 loops, best of 3: 519 µs per loop\n"
      ]
     }
    ],
@@ -1205,7 +1216,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 53,
+   "execution_count": 5,
    "metadata": {
     "collapsed": true,
     "slideshow": {
@@ -1219,7 +1230,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 54,
+   "execution_count": 6,
    "metadata": {
     "collapsed": false,
     "slideshow": {
@@ -1231,8 +1242,8 @@
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "The slowest run took 52.96 times longer than the fastest. This could mean that an intermediate result is being cached \n",
-      "100000 loops, best of 3: 2.19 µs per loop\n"
+      "The slowest run took 1538.53 times longer than the fastest. This could mean that an intermediate result is being cached.\n",
+      "100000 loops, best of 3: 1.98 µs per loop\n"
      ]
     }
    ],
@@ -1241,6 +1252,26 @@
    ]
   },
   {
+   "cell_type": "code",
+   "execution_count": 8,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "The slowest run took 9.51 times longer than the fastest. This could mean that an intermediate result is being cached.\n",
+      "1000 loops, best of 3: 332 µs per loop\n"
+     ]
+    }
+   ],
+   "source": [
+    "%timeit [element**2 for element in a]"
+   ]
+  },
+  {
    "cell_type": "markdown",
    "metadata": {
     "slideshow": {
@@ -2672,6 +2703,7 @@
   }
  ],
  "metadata": {
+  "celltoolbar": "Slideshow",
   "kernelspec": {
    "display_name": "Python 3",
    "language": "python",
@@ -2687,7 +2719,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.4.3"
+   "version": "3.5.1"
   }
  },
  "nbformat": 4,

+ 1 - 1
02_1_Indexing and Slicing.ipynb

@@ -2282,7 +2282,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.4.3"
+   "version": "3.5.1"
   }
  },
  "nbformat": 4,

+ 1 - 1
03_Numpy_Operations.ipynb

@@ -2130,7 +2130,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.4.3"
+   "version": "3.5.1"
   }
  },
  "nbformat": 4,

+ 1 - 1
04_Data_Processing.ipynb

@@ -975,7 +975,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.4.3"
+   "version": "3.5.1"
   }
  },
  "nbformat": 4,

+ 1 - 12
07_1_Sparse_Matrices.ipynb

@@ -4,17 +4,6 @@
    "cell_type": "markdown",
    "metadata": {
     "slideshow": {
-     "slide_type": "skip"
-    }
-   },
-   "source": [
-    "<small><i>This notebook was put together by [Jake Vanderplas](http://www.vanderplas.com) for PyCon 2014. Source and license info is on [GitHub](https://github.com/jakevdp/sklearn_pycon2014/).</i></small>"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "slideshow": {
      "slide_type": "slide"
     }
    },
@@ -526,7 +515,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.4.3"
+   "version": "3.5.1"
   }
  },
  "nbformat": 4,