The significant growth of artificial intelligence (AI) methods in machine learning (ML) and deep learning (DL) has opened opportunities for fluid dynamics and its applications in science, engineering and medicine. Developing AI methods for fluid dynamics encompass different challenges than applications with massive data, such as the Internet of Things. For many scientific, engineering and biomedical problems, the data are not massive, which poses limitations and algorithmic challenges. This paper reviews ML and DL research for fluid dynamics, presents algorithmic challenges and discusses potential future directions.