Skip to content

Replace data structures lesson with floating point comparisons #7

@LiamPattinson

Description

@LiamPattinson
  • Don't need to teach so much on lists/dicts. Can mention that these can be tested for equality somewhere earlier, but not dwell on it too much.
  • Focus instead on floating point tolerances, as most students will be scientists and this will be a common issue. Start with assert np.isclose(x, y, rtol=rtol, atol=atol).
  • Then teach np.testing etc as the preferred solution.

This will prime the students for snaptol in the following lesson.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions