MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _calc_k

Method _calc_k

lib/mpl_toolkits/axes_grid1/axes_divider.py:158–162  ·  view source on GitHub ↗
(sizes, total)

Source from the content-addressed store, hash-verified

156
157 @staticmethod
158 def _calc_k(sizes, total):
159 # sizes is a (n, 2) array of (rel_size, abs_size); this method finds
160 # the k factor such that sum(rel_size * k + abs_size) == total.
161 rel_sum, abs_sum = sizes.sum(0)
162 return (total - abs_sum) / rel_sum if rel_sum else 0
163
164 @staticmethod
165 def _calc_offsets(sizes, k):

Callers 1

_locateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected