SHARE
TWEET

Untitled

a guest Sep 17th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.  "cells": [
  3.   {
  4.    "cell_type": "code",
  5.    "execution_count": 10,
  6.    "metadata": {},
  7.    "outputs": [],
  8.    "source": [
  9.     "import numpy as np\n",
  10.     "a = np.array([0,1,0,1,0])\n",
  11.     "b = np.array([1,0,1,0,1])"
  12.    ]
  13.   },
  14.   {
  15.    "cell_type": "code",
  16.    "execution_count": 11,
  17.    "metadata": {},
  18.    "outputs": [
  19.     {
  20.      "data": {
  21.       "text/plain": [
  22.        "array([0, 0, 0, 0, 0])"
  23.       ]
  24.      },
  25.      "execution_count": 11,
  26.      "metadata": {},
  27.      "output_type": "execute_result"
  28.     }
  29.    ],
  30.    "source": [
  31.     "a*b"
  32.    ]
  33.   },
  34.   {
  35.    "cell_type": "code",
  36.    "execution_count": 4,
  37.    "metadata": {},
  38.    "outputs": [],
  39.    "source": [
  40.     "a = np.array([0,1])\n",
  41.     "b = np.array([1,0])"
  42.    ]
  43.   },
  44.   {
  45.    "cell_type": "code",
  46.    "execution_count": 12,
  47.    "metadata": {},
  48.    "outputs": [
  49.     {
  50.      "data": {
  51.       "text/plain": [
  52.        "0"
  53.       ]
  54.      },
  55.      "execution_count": 12,
  56.      "metadata": {},
  57.      "output_type": "execute_result"
  58.     }
  59.    ],
  60.    "source": [
  61.     "np.dot(a,b)"
  62.    ]
  63.   },
  64.   {
  65.    "cell_type": "code",
  66.    "execution_count": 6,
  67.    "metadata": {},
  68.    "outputs": [],
  69.    "source": [
  70.     "a = np.array([1,1,1,1,1])"
  71.    ]
  72.   },
  73.   {
  74.    "cell_type": "code",
  75.    "execution_count": 7,
  76.    "metadata": {},
  77.    "outputs": [
  78.     {
  79.      "data": {
  80.       "text/plain": [
  81.        "array([11, 11, 11, 11, 11])"
  82.       ]
  83.      },
  84.      "execution_count": 7,
  85.      "metadata": {},
  86.      "output_type": "execute_result"
  87.     }
  88.    ],
  89.    "source": [
  90.     "a+10"
  91.    ]
  92.   },
  93.   {
  94.    "cell_type": "code",
  95.    "execution_count": 13,
  96.    "metadata": {},
  97.    "outputs": [
  98.     {
  99.      "data": {
  100.       "text/plain": [
  101.        "0"
  102.       ]
  103.      },
  104.      "execution_count": 13,
  105.      "metadata": {},
  106.      "output_type": "execute_result"
  107.     }
  108.    ],
  109.    "source": [
  110.     "np.dot(a,b)"
  111.    ]
  112.   },
  113.   {
  114.    "cell_type": "code",
  115.    "execution_count": null,
  116.    "metadata": {},
  117.    "outputs": [],
  118.    "source": []
  119.   },
  120.   {
  121.    "cell_type": "code",
  122.    "execution_count": null,
  123.    "metadata": {},
  124.    "outputs": [],
  125.    "source": []
  126.   }
  127.  ],
  128.  "metadata": {
  129.   "kernelspec": {
  130.    "display_name": "Python",
  131.    "language": "python",
  132.    "name": "conda-env-python-py"
  133.   },
  134.   "language_info": {
  135.    "codemirror_mode": {
  136.     "name": "ipython",
  137.     "version": 3
  138.    },
  139.    "file_extension": ".py",
  140.    "mimetype": "text/x-python",
  141.    "name": "python",
  142.    "nbconvert_exporter": "python",
  143.    "pygments_lexer": "ipython3",
  144.    "version": "3.6.7"
  145.   }
  146.  },
  147.  "nbformat": 4,
  148.  "nbformat_minor": 4
  149. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top