pyLAPJV icon indicating copy to clipboard operation
pyLAPJV copied to clipboard

Returning very large arrays

Open kylemcdonald opened this issue 9 years ago • 1 comments

I'm seeing very large arrays being returned, with all the data after the initial "correct" data looking like old memory:

import numpy as np
import LAPJV
n = 8
cost = np.random.uniform(low=0, high=100000, size=(n, n))
%time min_cost,row_assigns,col_assigns,row_dual_vars,col_dual_vars = LAPJV.lap(cost)
print row_assigns.shape
print row_assigns[:(2*n)]

Output:

CPU times: user 12 µs, sys: 7 µs, total: 19 µs
Wall time: 16 µs
(988661682962169864,)
[          3           4           6           0           2           5
           1           7 -1556947360 -1487184053   227174464           1
   227235536           1  2045669697  1795533007]

kylemcdonald avatar Jan 23 '16 20:01 kylemcdonald

For what it's worth, there's another wrapper for lapjv that doesn't have this problem https://github.com/gatagat/lapjv

kylemcdonald avatar Feb 20 '17 05:02 kylemcdonald