added option to load numpy matrix