This file sets the title of this gist.
This gist gives an example of how to implement SO question 27138751 by defining a 'segment_plot' class.
********************************* | |
Checking data for AWAC_test01... OK! | |
********************************* | |
Checking data for AWAC_test01_earth2inst... | |
TIME OK! | |
env.c_sound OK! | |
env.pressure OK! | |
env.temp OK! |
from wave_resource_data import load as wrd_load | |
hs = |
{"attrs": | |
{"Dir":{"description":"Direction Normal to the Wave Crests", | |
"units":"deg", | |
"src_name":"Dir", | |
"SWAN_name":"DIR", | |
"IEC_name":"Sigma"}, | |
"Hsig":{"description":"Calculated as the zeroth spectral moment (i.e., H_m0)", | |
"units":"m", | |
"src_name":"Hsig", | |
"SWAN_name":"HSIGN", |
import numpy as np | |
import matplotlib.pyplot as plt | |
def map_hist(x, y, h, bins): | |
xi = np.digitize(x, bins[0]) - 1 | |
yi = np.digitize(y, bins[1]) - 1 | |
inds = np.ravel_multi_index((xi, yi), | |
(len(bins[0]) - 1, len(bins[1]) - 1), | |
mode='clip') |
import numpy as np | |
class buggy(object): | |
def __init__(self, arr): | |
self.arr = arr | |
def __pow__(self, other): | |
print "In __pow__" |
------------------------------------------------------------ | |
C:\Users\jrinker\AppData\Local\Continuum\Anaconda\Scripts\pip-script.py run on 11/02/15 08:48:10 | |
Downloading/unpacking PyTurbSim | |
Getting page https://pypi.python.org/simple/PyTurbSim/ | |
URLs to search for versions for PyTurbSim: | |
* https://pypi.python.org/simple/PyTurbSim/ | |
Analyzing links from page https://pypi.python.org/simple/pyturbsim/ | |
Found link https://pypi.python.org/packages/source/P/PyTurbSim/PyTurbSim-0.3.5.tar.gz#md5=d3cce66bc697d3b27fe5c5dd2e12a350 (from https://pypi.python.org/simple/pyturbsim/), version: 0.3.5 | |
Found link https://pypi.python.org/packages/source/P/PyTurbSim/PyTurbSim-0.3.6.tar.gz#md5=26fc1a96aa0f0e951e5f042163bd7bb6 (from https://pypi.python.org/simple/pyturbsim/), version: 0.3.6 | |
Found link https://pypi.python.org/packages/source/P/PyTurbSim/PyTurbSim-0.3.7.tar.gz#md5=9a99b0d454d967bfc6a0f7e410957dda (from https://pypi.python.org/simple/pyturbsim/), version: 0.3.7 |
This file sets the title of this gist.
This gist gives an example of how to implement SO question 27138751 by defining a 'segment_plot' class.
This file sets the title of this gist.
This gist gives an example of how to implement SO question 27138751 by defining a 'segment_plot' function.
importy numpy | |
strat = numpy.ones((100, 100, 100)) | |
p = strat.shape[0] | |
mutator = numpy.random.randint(0, 2, (p, p, p)) |
from scipy import sparse as sps | |
import numpy as np | |
z = np.arange(10) | |
N = len(z) | |
c = np.tile(z[:, None], (1, 10)).astype(int) | |
# Change some values: | |
c[:, 3] = 0 |