Hacks to make stream work even when sending empty matrices