NumPy User Guide: Array creation routines, NumPy Developers, 2024 - Official documentation explaining how to create NumPy arrays from various data structures, which is directly applicable to converting raw data into a matrix.
Mathematics for Machine Learning, Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong, 2020 (Cambridge University Press)DOI: 10.1017/9781108679901 - Provides the mathematical foundations for machine learning, including how linear algebra concepts apply to data representation (matrices and X, y vectors).