libpysal.cg.Line¶
- class libpysal.cg.Line(m, b)[source]¶
Geometric representation of line objects.
- Raises:¶
ArithmeticError – Raised when infinity is passed in as the slope.
Examples
>>> ls = Line(1, 0) >>> ls.m 1.0>>> ls.b 0.0Create a line from its slope and intercept.
- Parameters:¶
Methods
x(y)Returns the \(x\)-value of the line at a particular \(y\)-value.
y(x)Returns the \(y\)-value of the line at a particular \(x\)-value.