Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# cogent.maths.stats.util.FreqsI.__class__

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)

```    def __mul__(self, other):
"""Multiplies self by other (assumed scalar)."""
return self.__class__(self._data * other)

def __imul__(self, other):
```
```    def __div__(self, other):
"""Divides self by other (assumed scalar). Always true division."""
return self.__class__(self._data / (other))

def __idiv__(self, other):
```
```    def scale_sum(self, sum_=1.0):
"""Returns copy of self scaled to specified sum."""
return self.__class__(self._data * (sum_/sum(self._data)))

def scale_max(self, max_=1.0):
"""Returns copy of self scaled to specified maximum (default 1)."""
return self.__class__(self._data * (max_/max(self._data)))
```
```    def probs(self):
"""Returns copy of self scaled so that the sum is 1."""
return self.__class__(self._data / (sum(self._data)))

def randomIndices(self, length, random_vector=None):
```

```    def __mul__(self, other):
"""Multiplies self by other (assumed scalar)."""
return self.__class__(self._data * other)

def __imul__(self, other):
```
```    def __div__(self, other):
"""Divides self by other (assumed scalar). Always true division."""
return self.__class__(self._data / (other))

def __idiv__(self, other):
```
```    def scale_sum(self, sum_=1.0):
"""Returns copy of self scaled to specified sum."""
return self.__class__(self._data * (sum_/sum(self._data)))

def scale_max(self, max_=1.0):
"""Returns copy of self scaled to specified maximum (default 1)."""
return self.__class__(self._data * (max_/max(self._data)))
```
```    def probs(self):
"""Returns copy of self scaled so that the sum is 1."""
return self.__class__(self._data / (sum(self._data)))

def randomIndices(self, length, random_vector=None):
```