Skip to content

Commit

Permalink
Docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
lbittarello committed Feb 12, 2024
1 parent c8bae79 commit 2c5297b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/glum/_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ class TweedieLink(Link):
"""The Tweedie link function ``x^(1-p)`` if ``p≠1`` and ``log(x)`` if ``p=1``."""

def __new__(cls, p: float):
"""
Create a new ``TweedieLink`` object.
"""Create a new ``TweedieLink`` object.
Parameters
----------
Expand All @@ -343,8 +342,7 @@ def __eq__(self, other): # noqa D
return isinstance(other, self.__class__) and (self.p == other.p)

def link(self, mu):
"""
Get the Tweedie canonical link.
"""Get the Tweedie canonical link.
See superclass documentation.
Expand All @@ -355,8 +353,7 @@ def link(self, mu):
return _asanyarray(mu) ** (1 - self.p)

def derivative(self, mu):
"""
Get the derivative of the Tweedie link.
"""Get the derivative of the Tweedie link.
See superclass documentation.
Expand All @@ -368,8 +365,7 @@ def derivative(self, mu):

@catch_p
def inverse(self, lin_pred):
"""
Get the inverse of the Tweedie link.
"""Get the inverse of the Tweedie link.
See superclass documentation.
Expand Down

0 comments on commit 2c5297b

Please sign in to comment.