Skip to content

Training material on 'What can abstract mathematics tell us about programming climate models?'

License

Notifications You must be signed in to change notification settings

Cambridge-ICCS/training-cats-for-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation



Training material for 'What can abstract mathematics tell us about programming climate models?'

GitHub

This is a short training session that gives an introduction to basic concepts in category theory and how they can be used to structure common programming patterns in numerical programming (e.g., in climate mdoels), informing both testing and optimization. This training was initially delivered at the ICCS Summer School 2024.

Contents

The repository contains a number of examples that are then guided through via slides and blackboard.

  • [src/category.py] - The analogy of a category of Python types as objects and functions as morphisms;
  • [src/functor.py] - Analogy of lists and arrays as functors
  • [src/nat_trans.py] - Examples of natural transformations on lists.
  • [src/comonad.py] - Analogy of comonads for arrays

Alongside these files are tests based on the expected axioms from the category theory structures being used as analogies:

  • [src/test_functors.py] - Tests functor axioms
  • [src/test_nat_functors.py] - Tests naturality axiom

About

Training material on 'What can abstract mathematics tell us about programming climate models?'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages