Thanks for this amazing project. As a blind computer science student studying data science, this has been very helpful. I was making a chart with three lines when I got this error (the alt is what I used as the name for the import, so is not part of the issue):
alt.show_with_alt(chart_type="line",desc_level=3, methods=["txt_file","table"])
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/matplotalt.py", line 378, in show_with_alt
alt_text = generate_alt_text(axs=axs, fig=fig, chart_type=chart_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/matplotalt.py", line 304, in generate_alt_text
alt_text += chart_desc_class.get_chart_desc(desc_level=desc_level, sig_figs=sig_figs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/chart_descriptions.py", line 488, in get_chart_desc
alt_text_arr.append(self.get_trends_desc(sig_figs=desc_config["sig_figs"]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/chart_descriptions.py", line 1119, in get_trends_desc
return super().get_trends_desc(trends=trends, trend_axis=trend_axis, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/chart_descriptions.py", line 421, in get_trends_desc
var_trends_desc_arr.extend([BASE_TREND_NAME_TO_FUNC[trend_name](chart_dict=self.chart_dict,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/trend_helpers.py", line 97, in _correlation_tf
var_corrs = np.empty((len(num_vars), len(num_vars)))
^^^^^^^^^^^^^
TypeError: object of type 'int' has no len()
(venv) nogden@goldberg:~/cs260/lab2$
I don't exactly know what the issue is, but my best guess is that it is using a variable that is a int in the len method which is not allowed and cuasing the error. Anyways, if anyone knows what is the cuasing the issue, that would be very helpful.
Thanks for this amazing project. As a blind computer science student studying data science, this has been very helpful. I was making a chart with three lines when I got this error (the alt is what I used as the name for the import, so is not part of the issue):
alt.show_with_alt(chart_type="line",desc_level=3, methods=["txt_file","table"])
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/matplotalt.py", line 378, in show_with_alt
alt_text = generate_alt_text(axs=axs, fig=fig, chart_type=chart_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/matplotalt.py", line 304, in generate_alt_text
alt_text += chart_desc_class.get_chart_desc(desc_level=desc_level, sig_figs=sig_figs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/chart_descriptions.py", line 488, in get_chart_desc
alt_text_arr.append(self.get_trends_desc(sig_figs=desc_config["sig_figs"]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/chart_descriptions.py", line 1119, in get_trends_desc
return super().get_trends_desc(trends=trends, trend_axis=trend_axis, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/chart_descriptions.py", line 421, in get_trends_desc
var_trends_desc_arr.extend([BASE_TREND_NAME_TO_FUNC[trend_name](chart_dict=self.chart_dict,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homes/nogden/cs260/venv/lib/python3.12/site-packages/matplotalt/trend_helpers.py", line 97, in _correlation_tf
var_corrs = np.empty((len(num_vars), len(num_vars)))
^^^^^^^^^^^^^
TypeError: object of type 'int' has no len()
(venv) nogden@goldberg:~/cs260/lab2$
I don't exactly know what the issue is, but my best guess is that it is using a variable that is a int in the len method which is not allowed and cuasing the error. Anyways, if anyone knows what is the cuasing the issue, that would be very helpful.