added numpy wrapper to avoid casting to Constant