compatibility with old scipy