Remove dependency on numpy