/usr/share/pyshared/mdp/test/test_CutoffNode.py is in python-mdp 3.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 | from _tools import *
def test_CutoffNode():
node = mdp.nodes.CutoffNode(-1.5, 1.2)
x = numx.array([[0.1, 0, -2, 3, 1.2, -1.5, -3.33]])
y_ref = numx.array([[0.1, 0, -1.5, 1.2, 1.2, -1.5, -1.5]])
y = node.execute(x)
assert numx.all(y==y_ref)
|