Ejemplo n.º 1
0
def test_statistics_nan():
    # Get the path to the Envira files
    file_paths = abs_path('data/MINIMER2015')

    # Set the pattern
    pattern = r'[\w\d\s]+\.dat'

    # Create a grid object from the data file
    grid = Grid.read_enviras(file_paths, pattern)

    # Modify the data
    grid.data = np.nan

    # Check if the statistics can be calculated
    Grid.statistics(grid)
Ejemplo n.º 2
0
def test_statistics_multigrid():
    # Get the path to the Envira files
    file_paths = abs_path('data/MINIMER2015')

    # Set the pattern
    pattern = r'[\w\d\s]+\.dat'

    # Create a grid object from the data file
    grid = Grid.read_enviras(file_paths, pattern)
    stats = Grid.statistics(grid)

    assert isinstance(stats, dict)