Error message when using the include/exclude pairs option with the command line option

14 views
Skip to first unread message

Simon Dellicour

unread,
Nov 20, 2018, 9:35:00 AM11/20/18
to Circuitscape

Hi everyone,

 

I’m currently trying to use the pairwise mode with the “include/exclude pairs” option. When running it on the Circuitscape interface, I have no error message and everything seems to run well (however, this option seems surprisingly slower than computing all the pairwise distances… (?)). But when I try to run it from a MacOS terminal (using the Python package version), I get the following error message:

 

Processing maps

Resistance/conductance map has 2202 nodes

/Library/Python/2.7/site-packages/circuitscape/compute_base.py:510: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.

  if None != g_map:

Graph has 2202 nodes, 184 focal nodes and 1 components.

Traceback (most recent call last):

  File "Elevation_least-cost_CStemp_100/CS_script.sh", line 5, in <module>

    result = cs.compute()

  File "/Library/Python/2.7/site-packages/circuitscape/profiler.py", line 144, in wrapper

    return func(*args)

  File "/Library/Python/2.7/site-packages/circuitscape/compute.py", line 31, in compute

    return self.compute_raster()

  File "/Library/Python/2.7/site-packages/circuitscape/profiler.py", line 144, in wrapper

    return func(*args)

  File "/Library/Python/2.7/site-packages/circuitscape/compute.py", line 152, in compute_raster

    resistances, solver_failed = self.pairwise_module(self.state.g_map, self.state.poly_map, self.state.points_rc)

  File "/Library/Python/2.7/site-packages/circuitscape/profiler.py", line 144, in wrapper

    return func(*args)

  File "/Library/Python/2.7/site-packages/circuitscape/compute.py", line 371, in pairwise_module

    (resistances, solver_failed) = self.single_ground_all_pair_resistances(g_habitat, fp, out, True)

  File "/Library/Python/2.7/site-packages/circuitscape/profiler.py", line 144, in wrapper

    return func(*args)

  File "/Library/Python/2.7/site-packages/circuitscape/compute.py", line 498, in single_ground_all_pair_resistances

    for (pt1_idx, pt2_idx) in fp.point_pair_idxs_in_component(c, g_habitat):

  File "/Library/Python/2.7/site-packages/circuitscape/compute_base.py", line 500, in point_pair_idxs_in_component

    src = self.get_graph_node_idx(pt2_idx, node_map)

  File "/Library/Python/2.7/site-packages/circuitscape/compute_base.py", line 429, in get_graph_node_idx

    return self.grid_to_graph(self.points_rc[focal_point_idx,1], self.points_rc[focal_point_idx,2], node_map)

IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

 

Note that I don’t get this message when setting “use_included_pairs = False” in my “.ini” file, so this error should be specifically related to the “include/exclude pairs” option. Has anyone already encountered that specific issue?

 

I suspect a problem related to the “numpy” dependency… For information, I used the Python package versions advised in the following post (numpy 1.12.1, scipy 0.19.0, pyamg 3.2.1):

https://groups.google.com/forum/#!msg/circuitscape/YzwV5BDG5fg/X9JhkVehAgAJ

 

All the best,

 

Simon


Reply all
Reply to author
Forward
0 new messages