{"id":24015,"library":"mathematics-dataset","title":"Mathematics Dataset","description":"A synthetic dataset of school-level mathematics questions from DeepMind, covering arithmetic, algebra, calculus, and more. Current version 1.0.1, released in 2019. No active development; stable.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/deepmind/mathematics_dataset","tags":["dataset","mathematics","deepmind","synthetic-data"],"install":[{"cmd":"pip install mathematics-dataset","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required for Python 2/3 compatibility.","package":"six","optional":false}],"imports":[{"note":"The dataset class is at the top-level package, not in a submodule.","wrong":"from mathematics_dataset.datasets import MathematicsDataset","symbol":"MathematicsDataset","correct":"from mathematics_dataset import MathematicsDataset"}],"quickstart":{"code":"from mathematics_dataset import MathematicsDataset\ndataset = MathematicsDataset('train-easy', verbose=False)\nfor i, (question, answer) in enumerate(dataset):\n    if i >= 5:\n        break\n    print(f'Q: {question}\\nA: {answer}\\n')","lang":"python","description":"Loads the training set of easy questions and prints the first 5 question-answer pairs."},"warnings":[{"fix":"Always validate a sample of answers before using the dataset for training or evaluation.","message":"The dataset only provides synthetic questions; answers may contain errors or be nonsensical for edge cases.","severity":"gotcha","affected_versions":"all"},{"fix":"Pre-download with: python -c 'from mathematics_dataset import MathematicsDataset; MathematicsDataset(\"train-easy\")'","message":"The first time you load a dataset, it downloads and caches a ~1.4GB tar file. Ensure sufficient disk space and a stable internet connection.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a virtual environment with Python 3.7 or 3.6; check issue #12 on GitHub.","message":"The library uses Python 2-style print and has not been updated for Python 3.8+ edge cases. Some imports may break with newer Python versions.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install mathematics-dataset","cause":"Package not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'mathematics_dataset'"},{"fix":"Use one of the exact splits: 'train-easy', 'train-medium', 'train-hard', 'test-easy', 'test-medium', 'test-hard', 'interpolate'","cause":"Typo in split name or missing hyphen.","error":"ValueError: Unrecognised split: train-easy (valid: train-easy, train-medium, train-hard, test-easy, test-medium, test-hard, interpolate)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}