PascalLesage / presamples

Package to write, load, manage and verify numerical arrays, called presamples.
BSD 3-Clause "New" or "Revised" License
14 stars 11 forks source link

passing 'seed=sequential' in LCA object not working #27

Closed PascalLesage closed 6 years ago

PascalLesage commented 6 years ago

The following did not yield expected results:

excs = [*act.technosphere()] sample_array = np.eye(len(excs)) indices = [(exc['input'], exc['output'], 'technosphere') for exc in excs] _, fp = create_presample_matrix(sample_array, indices, 'technosphere') lca = LCA({act:1}, presamples=[fp], seed='sequential') lca.lci() #expect first exc to be==1, others 0: not the case lca.lci() #expect second exc to be==1, others 0: not the case ... Samples are in fact returned in random order.

PascalLesage commented 6 years ago

Problem definition not correct: 'sequential' should have been passed in presample package, not LCA object. In fact, a seed at the level of the LCA object is not relevant. That said, there is still an issue with use of 'sequential' in LCA, but this is another issue.