Skip to content

Commit

Permalink
Less warnings, more?
Browse files Browse the repository at this point in the history
Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
  • Loading branch information
klecki committed Apr 7, 2022
1 parent 9c47968 commit db4686e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions dali/operators/signal/decibel/to_decibels_op_cpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
namespace dali {

DALI_SCHEMA(ToDecibels)
.DocStr(R"code(Converts a magnitude (real, positive) to the decibel scale by using
the following formula::
.DocStr(R"code(Converts a magnitude (real, positive) to the decibel scale.
Conversion is done according to the following formula::
min_ratio = pow(10, cutoff_db / multiplier)
out[i] = multiplier * log10( max(min_ratio, input[i] / reference) ))code")
Expand Down
8 changes: 4 additions & 4 deletions docs/autodoc_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ def get_references(name, references):
def single_fun_file(full_name, references):
"""Generate stub page for documentation of given function from fn api.
"""
result = ""
result += f".. _{full_name}:\n\n{full_name}\n"
result = f"{full_name}\n"
result += "-" * len(full_name) + "\n\n"
result += f".. autofunction:: {full_name}\n\n"
result += get_references(full_name, references)
Expand All @@ -106,16 +105,17 @@ def single_fun_file(full_name, references):
def single_module_file(module, funs_in_module, references):
"""Generate stub page for documentation of given module
"""
result = ""
result += f".. _{module}:\n\n{module}\n"
result = f"{module}\n"
result += "~" * len(module) + "\n\n"

if module in mod_aditional_doc:
result += mod_aditional_doc[module] + "\n\n"
result += get_references(module, references)
result += "\n"

result += f"The following table lists all operations available in ``{module}`` module:\n"
result += operations_table.operations_table_str(get_schema_names(module, funs_in_module))
result += "\n\n"


result += ".. toctree::\n :hidden:\n\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/operations_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def operations_table_str(ops_to_process):
full_doc = schema.Dox()
else:
full_doc = eval('ops.' + op).__doc__
short_descr = full_doc.split("\n\n")[0].replace('\n', ' ')
short_descr = full_doc.split("\n\n")[0].replace('\n', ' ').replace("::", '.')
for (module_name, module) in ops_modules.items():
m = module
for part in submodule:
Expand Down

0 comments on commit db4686e

Please sign in to comment.