implement just enough of mtrand to make tests start passing
avoid dtype(object)