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
class PointSet(np.ndarray): | |
""" The PointSet class can be used to represent sets of points or | |
vectors, as well as singleton points. The dimensionality of the | |
vectors in the pointset can be anything, and the dtype can be any | |
of those supported by numpy. | |
This class inherits from np.ndarray, which makes it very flexible; | |
you can threat it as a regular array, and also pass it to functions | |
that require a numpy array. The shape of the array is NxD, with N | |
the number of points, and D the dimensionality of each point. |
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
#!/usr/bin/env python3 | |
""" | |
Functionality for cleaning up your git repository. | |
This uses commands found on: | |
https://help.github.com/articles/remove-sensitive-data | |
""" | |
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
from skimage.graph.heap import BinaryHeap as BinaryHeap_sk | |
import time | |
VALUE_T = nb.float64 | |
REFERENCE_T = nb.int32 | |
@nb.jit # jit is slightly faster, compile time for autojit is ~2s | |
class BinaryHeap: | |
@nb.void(nb.int32) |
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 skimage.measure | |
import skimage.morphology | |
import visvis as vv | |
from visvis.utils import iso | |
import numpy as np | |
def ball(radius, dtype=np.uint8): | |
# New from skimage.morphology |
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
class MouseEvent(Event): | |
""" Class describing mouse events. | |
Input arguments | |
--------------- | |
source : object | |
The visualization object that this event is created from or applies to. | |
type : str | |
string indicating the event type (e.g. mouse_press, key_release) | |
kwds : keyword arguments |
NewerOlder