{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import numpy as np" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": true }, "outputs": [], "source": [ "p1 = np.load('jacobian1.npy') # TJ's workstation at IC\n", "p2 = np.load('jacobian2.npy') # TJ's other 4 machine" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "(68, 68)" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p1.shape" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": true }, "outputs": [], "source": [ "diff = np.absolute(p1-p2)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.020833333333333398" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.max(diff)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "1685" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.argmax(diff)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "(24, 53)" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.unravel_index(np.argmax(diff),p1.shape)" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.062499999999999986" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p1[24,53]" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.041666666666666588" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p2[24,53]" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }