diff --git a/autodoc/__pycache__/autodoc.cpython-311.pyc b/autodoc/__pycache__/autodoc.cpython-311.pyc index 7c35c0c..e92540a 100644 Binary files a/autodoc/__pycache__/autodoc.cpython-311.pyc and b/autodoc/__pycache__/autodoc.cpython-311.pyc differ diff --git a/autodoc/autodoc.py b/autodoc/autodoc.py index ed2ac7d..0d141b3 100644 --- a/autodoc/autodoc.py +++ b/autodoc/autodoc.py @@ -40,6 +40,7 @@ def __type_size__(mtype): def __num_bytes__(sig): noe = 1 if "NumberOfElements" not in sig else int(sig["NumberOfElements"]) nod = 1 if "NumberOfDimensions" not in sig else int(sig["NumberOfDimensions"]) + nod = nod if nod > 0 else 1 bytes = __type_bytes__(sig["Type"]) return noe * nod * bytes @@ -61,9 +62,10 @@ def __doc_obj__(label, obj, id): def __sig_type__(sig): type_name = sig["Type"] - noe = sig["NumberOfElements"] if "NumberOfElements" in sig else 1 - nod = sig["NumberOfDimensions"] if "NumberOfDimensions" in sig else 1 - dim = int(noe) * int(nod) + noe = int(sig["NumberOfElements"]) if "NumberOfElements" in sig else 1 + nod = int(sig["NumberOfDimensions"]) if "NumberOfDimensions" in sig else 1 + nod = nod if nod > 0 else 1 + dim = noe * nod return (type_name, dim)