fixed minor qcml bugs. auto-cast numpy matrices.