This file is indexed.

/usr/share/pyshared/bimdp/test/test_parallelbihinet.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
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import mdp
from mdp import numx as n
from bimdp import BiFlow, MSG_ID_SEP, EXIT_TARGET
from bimdp.parallel import (
    ParallelBiFlow, ParallelCloneBiLayer
)
from bimdp.nodes import SFABiNode
from bimdp.hinet import BiFlowNode


class TestCloneBiLayer(object):
    """Test the behavior of the BiCloneLayer."""

    def test_use_copies_msg(self):
        """Test the correct reaction to an outgoing use_copies message."""
        stop_result = ({"clonelayer" + MSG_ID_SEP + "use_copies": True},
                       EXIT_TARGET)
        stop_sfa_node = SFABiNode(stop_result=stop_result,
                                  input_dim=10, output_dim=3)
        biflownode = BiFlowNode(BiFlow([stop_sfa_node]))
        clonelayer = ParallelCloneBiLayer(node=biflownode,
                                                n_nodes=3,
                                                use_copies=False,
                                                node_id="clonelayer")
        data = [[n.random.random((100,30)) for _ in range(5)]]
        biflow = ParallelBiFlow([clonelayer])
        biflow.train(data, scheduler=mdp.parallel.Scheduler())
        assert clonelayer.use_copies is True