Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables #700

Merged
merged 29 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions atintegrators/atelem.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,18 @@ static long atGetLong(const PyObject *element, const char *name)
{
const PyObject *attr = PyObject_GetAttrString((PyObject *)element, name);
if (!attr) return 0L;
long l = PyLong_AsLong((PyObject *)attr);
Py_DECREF(attr);
return PyLong_AsLong((PyObject *)attr);
return l;
}

static double atGetDouble(const PyObject *element, const char *name)
{
const PyObject *attr = PyObject_GetAttrString((PyObject *)element, name);
if (!attr) return 0.0;
double d = PyFloat_AsDouble((PyObject *)attr);
Py_DECREF(attr);
return PyFloat_AsDouble((PyObject *)attr);
return d;
}

static long atGetOptionalLong(const PyObject *element, const char *name, long default_value)
Expand Down
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
'sphinx.ext.intersphinx',
'sphinx.ext.githubpages',
'sphinx.ext.viewcode',
'myst_parser',
'myst_nb',
'sphinx_copybutton',
'sphinx_design',
]

intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
Expand All @@ -56,7 +57,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["README.rst", "**/*.so"]
exclude_patterns = ["README.rst", "**/*.so", "_build/*"]
rst_prolog = """
.. role:: pycode(code)
:language: python
Expand Down Expand Up @@ -92,6 +93,8 @@
"deflist"
]
myst_heading_anchors = 3
nb_execution_mode = "auto"
nb_execution_allow_errors = True

# -- Options for HTML output -------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/p/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Sub-packages

howto/Installation
howto/Primer
notebooks/variables

.. toctree::
:maxdepth: 2
Expand Down