Removed dependency on numpy