Skip to content

Instantly share code, notes, and snippets.

@christinahedges
Created July 6, 2018 21:16
Show Gist options
  • Save christinahedges/3b53a127e0dbf4d12f243f9162ccab51 to your computer and use it in GitHub Desktop.
Save christinahedges/3b53a127e0dbf4d12f243f9162ccab51 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"periods = np.asarray([1.51, 2.42, 4.04, 6.09, 9.2, 12.35, 18.76])"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 1. 1.60264901 2.67549669 4.03311258 6.09271523 8.17880795\n",
" 12.42384106]\n",
"[ 2. 3.20529801 5.35099338 8.06622517 12.18543046 16.35761589\n",
" 24.84768212]\n"
]
}
],
"source": [
"print(periods/periods[0])\n",
"print(periods/periods[0]*2)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment