Return the total number of sample outcomes that have been recorded by this FreqDist. For the number of unique sample values (or bins) with counts greater than zero, use ``FreqDist.B()``. :rtype: int
(self)
| 105 | self._N = None |
| 106 | |
| 107 | def N(self): |
| 108 | """ |
| 109 | Return the total number of sample outcomes that have been |
| 110 | recorded by this FreqDist. For the number of unique |
| 111 | sample values (or bins) with counts greater than zero, use |
| 112 | ``FreqDist.B()``. |
| 113 | |
| 114 | :rtype: int |
| 115 | """ |
| 116 | if self._N is None: |
| 117 | # Not already cached, or cache has been invalidated |
| 118 | self._N = sum(self.values()) |
| 119 | return self._N |
| 120 | |
| 121 | def __setitem__(self, key, val): |
| 122 | """ |
no test coverage detected