Mentions légales du service

Skip to content

[refactoring] clean up the semantics of when/whether SNP and POS arrays are copied when instantiating an SNPSample

E. Madison Bray requested to merge embray/snpsample-copy into master

this changes the semantics from before, in that by default a copy is not performed if unnecessary

in particular this should reduce overhead when loading SNP matrices from Numpy arrays, such as when loading them from NPZ files--previously an unnecessary copy of the array buffers was being performed in this case

this change also results in fixing issue #47 (closed)--since the default behavior of tensor.tensor() on Numpy arrays was to clone the resulting tensor, which PyTorch will attempt to parallelize for tensors with >= 2^15 elements

Merge request reports