Skip to content

Occasional bug in regional statistics #7

@mflaxman10

Description

@mflaxman10

Don't always get this, and don't understand exact conditions when I do.

Most recently:
Generating value counts for formula ARIA - Soil Moisture - Positive Range 100
in region
Brazil - SC - Otacilio Costa - Forest
for July 2017 composite


TypeError Traceback (most recent call last)
in
7 # The regional aggregate function takes a list of value count results and
8 # returns the regional statistics.
----> 9 regional_aggregate = ts.regional_aggregate(aggregates)
10 print(regional_aggregate)

~/.local/lib/python3.5/site-packages/tesselate/tesselate.py in regional_aggregate(self, valuecounts)
77
78 def regional_aggregate(self, valuecounts):
---> 79 return regional_aggregate(valuecounts)
80
81 def z_scores_grouping(self, mean, std):

~/.local/lib/python3.5/site-packages/tesselate/aggregation.py in regional_aggregate(valuecounts)
45 """
46 # Compute sum of sums.
---> 47 stats_t0 = sum([dat['pcount'] for dat in valuecounts])
48 stats_t1 = sum([dat['psum'] for dat in valuecounts])
49 stats_t2 = sum([dat['psumsq'] for dat in valuecounts])

TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

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