Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def imap_throttled(func, iterable, load_balanced_view=None, | |
wait_interval=0.05, buffer_factor=3): | |
"""Asynchronous parallel "imap()" with bounded buffer. | |
The accumulation of computed results in memory is limited | |
to 'buffer_factor' times the number of nodes. | |
Parameters: | |
func : function | |
func(x) will be called for each input item, as in map(). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make notebooks | |
make -C tutorial notebooks | |
ipython nbconvert --to rst ../../../trackpy-examples/notebooks/walkthrough.ipynb | |
[NbConvertApp] Using existing profile dir: u'/Users/nkeim/.ipython/profile_default' | |
[NbConvertApp] Converting notebook ../../../trackpy-examples/notebooks/walkthrough.ipynb to rst | |
[NbConvertApp] Support files will be in walkthrough_files/ | |
Traceback (most recent call last): | |
File "/Users/nkeim/anaconda/bin/ipython", line 6, in <module> | |
sys.exit(start_ipython()) | |
File "/Users/nkeim/anaconda/lib/python2.7/site-packages/IPython/__init__.py", line 120, in start_ipython |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def fast_hist(data, bin_edges): | |
"""Fast 1-dimensional histogram. Comparable to numpy.histogram(), but careless. | |
'bin_edges' should encompass all values in 'data'; the first and last elements | |
in 'bin_edges' are ignored, and are effectively (-infinity, infinity). | |
Returns the histogram array only. | |
""" |