@@ -4,6 +4,7 @@
Loading
4 4
5 5
import numpy as np
6 6
7 +
7 8
def _sum_by_group_sorted(indices, *values):
8 9
    """Auxiliary function to sum up values by some given indices (both as numpy arrays). Expects the
9 10
    indices and values to already be sorted.
@@ -56,24 +57,27 @@
Loading
56 57
57 58
def select_from_pit(table_index_array, input_array, data):
58 59
    """
59 -
        Auxiliary function to retrieve values from a table like a pit. Each data entry corresponds to a
60 -
        table_index_array entry. Example: velocities are indexed by the corresponding from_nodes stored in the
61 -
        pipe pit.
62 -
63 -
        The function inputs another array which consists of some table_index_array entries the user wants to retrieve.
64 -
        The function is used in pandapipes results evaluation. The input array is the list of from_junction entries,
65 -
        corresponding only to the junction elements, not containing additional pipe nodes. The table_index_array
66 -
        is the complete list of from_nodes consisting of junction element entries and additional pipe section nodes.
67 -
        Data corresponds to the gas velocities.
68 -
69 -
        :param indices:
70 -
        :type indices:
71 -
        :param values:
72 -
        :type values:
60 +
        Auxiliary function to retrieve values from a table like a pit. Each data entry corresponds
61 +
        to a table_index_array entry. Example: velocities are indexed by the corresponding
62 +
        from_nodes stored in the pipe pit.
63 +
64 +
        The function inputs another array which consists of some table_index_array entries the user
65 +
        wants to retrieve. The function is used in pandapipes results evaluation. The input array is
66 +
        the list of from_junction entries, corresponding only to the junction elements, not
67 +
        containing additional pipe nodes. The table_index_array is the complete list of from_nodes
68 +
        consisting of junction element entries and additional pipe section nodes. Data corresponds
69 +
        to the gas velocities.
70 +
71 +
        :param table_index_array:
72 +
        :type table_index_array:
73 +
        :param input_array:
74 +
        :type input_array:
75 +
        :param data:
76 +
        :type data:
73 77
        :return:
74 78
        :rtype:
75 79
        """
76 80
    sorter = np.argsort(table_index_array)
77 81
    indices = sorter[np.searchsorted(table_index_array, input_array, sorter=sorter)]
78 82
79 -
    return data[indices]

@@ -185,7 +185,7 @@
Loading
185 185
    if hasattr(net, "res_junction"):
186 186
        net.res_junction.index = get_indices(net.res_junction.index, junction_lookup)
187 187
188 -
    for element, value in element_junction_tuples():
188 +
    for element, value in element_junction_tuples(net=net):
189 189
        if element in net.keys():
190 190
            net[element][value] = get_indices(net[element][value], junction_lookup)
191 191
    net["junction_geodata"].set_index(get_indices(net["junction_geodata"].index, junction_lookup),
@@ -400,7 +400,7 @@
Loading
400 400
    if "res_pipe" in net.keys():
401 401
        res_pipes = net.res_pipe.index.intersection(pipes)
402 402
        net["res_pipe"].drop(res_pipes, inplace=True)
403 -
    logger.info("dropped %d pipes" % len(pipes))
403 +
    logger.info("dropped %d pipes" % len(list(pipes)))
404 404
405 405
406 406
# TODO: change to pumps??
Files Coverage
pandapipes 90.93%
Project Totals (71 files) 90.93%
622.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading