N2HTML should be able to use any sized default inputs
The N2HTML
uses the default inputs of the disciplines specified as NumPy arrays (or as objects with a size
attribute) to deduce the sizes of the input variables.
I think that N2HTML
should be able to work with disciplines whose default inputs are Sized
and not necessarily NumPy arrays, e.g.
from gemseo import generate_n2_plot
from gemseo.disciplines.analytic import AnalyticDiscipline
from numpy import array
a = AnalyticDiscipline({"y": "x"}, name="A")
a.default_inputs.update({"x": array([1, 2])})
b = AnalyticDiscipline({"x": "y"}, name="B")
b.default_inputs.update({"y": [1, 2, 3]})
generate_n2_plot([a, b], show_html=True)