This object is solely for me to organize my thoughts, it probably is a horrific thing if seen by a theoretical computer scientist, and gets a lot of the terminalogy wrong. Type probably usually means a theoretical type, which I think is defined as the set of all possible instances.
This file contains 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 rolling_window(array, window=(0,), asteps=None, wsteps=None, axes=None, toend=True): | |
"""Create a view of `array` which for every point gives the n-dimensional | |
neighbourhood of size window. New dimensions are added at the end of | |
`array` or after the corresponding original dimension. | |
Parameters | |
---------- | |
array : array_like | |
Array to which the rolling window is applied. | |
window : int or tuple |
This file contains 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 object_einsum(string, *arrays): | |
"""Simplified object einsum, not as much error checking | |
does not support "..." or list input and will see "...", etc. as three times | |
an axes identifier, tries normal einsum first! | |
NOTE: This is untested, and not fast, but object type is | |
never really fast anyway... |
This file contains 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 | |
from pathlib import Path | |
import ast | |
import tokenize | |
class FindFuncs(ast.NodeVisitor): | |
# Very dirtily adapted and stolen from NumPy tests... | |
def __init__(self, filename, include_attributes=True): |
This file contains 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
""" | |
Simply run the script to try to guess some information about how numpy | |
is linked. | |
If there is something odd going on, run/import the script after | |
your real import of numpy. | |
All versions tested on Linux, MKL is confusing me a bit since both lower and | |
upper case versions exist. |
This file contains 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 | |
from collections import defaultdict as _dd | |
def rolling_window(array, window=(0,), asteps=None, wsteps=None, axes=None, toend=True): | |
"""Create a view of `array` which for every point gives the n-dimensional | |
neighbourhood of size window. New dimensions are added at the end of | |
`array` or after the corresponding original dimension. | |
Parameters | |
---------- |
Downloading both files and running the cells (takes a while) should give you drop downs with the NumPy namespace (dark green names should be the ones that end up in the main numpy namespace).
After clicking one of them, tab will go to the next, and 1, 2, 3 , and 4 will allow to fairly quickly choose how you feel about the function. I left many blank (at least the ones that are not part of the main namespace). Then you press "save" and after gathering a few of them, maybe we can get some nice result out of the data.
Unfortunately the Jupyter widgets are failry slow, although with the keyboard it was not an issue for me.
My take on the categories:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder