---
title: "Rational constructor"
url: "https://reference.aspose.com/cad/python-net/aspose.cad.xmp.types.derived/rational/__init__/"
product: "Aspose.CAD for Python via .NET API References"
---


## __init__ {#int-int}

Initializes a new instance of the [`Rational`](/cad/python-net/aspose.cad.xmp.types.derived/rational) class.



```python
def __init__(self, numerator, denominator):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| numerator | int | The numerator. |
| denominator | int | The denominator. |
### Exceptions
| Exception | Description |
| :- | :- |
| ArgumentOutOfRangeException | numerator;Numberator should be grater zero.<br/>or<br/>denominator;Denominator should be grater zero. |





### See Also
* module [`aspose.cad.xmp.types.derived`](../../)
* class [`Rational`](/cad/python-net/aspose.cad.xmp.types.derived/rational)
