question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Area with `y2` triggers ununderstandable ndarray VisibleDeprecationWarning

See original GitHub issue

ALL software version info

# Name                    Version                   Build  Channel
hvplot                    0.7.0              pyhd3deb0d_0    conda-forge
# packages in environment at /home/maye/miniconda3/envs/py38:
#
# Name                    Version                   Build  Channel
bokeh                     2.2.3            py38h578d9bd_0    conda-forge
# packages in environment at /home/maye/miniconda3/envs/py38:
#
# Name                    Version                   Build  Channel
ipython                   7.19.0           py38h81c977d_2    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jupyter-lsp-python        1.1.1              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.2            py38h1fd1430_1    conda-forge
python                    3.8.6           hffdb5ce_4_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python-jsonrpc-server     0.4.0              pyh9f0ad1d_0    conda-forge
python-language-server    0.36.2             pyhd8ed1ab_0    conda-forge
python_abi                3.8                      1_cp38    conda-forge
# packages in environment at /home/maye/miniconda3/envs/py38:
#
# Name                    Version                   Build  Channel
notebook                  6.2.0            py38h578d9bd_0    conda-forge
# packages in environment at /home/maye/miniconda3/envs/py38:
#
# Name                    Version                   Build  Channel
jupyter                   1.0.0            py38h578d9bd_6    conda-forge
jupyter-lsp               1.1.1              pyhd8ed1ab_0    conda-forge
jupyter-lsp-python        1.1.1              pyhd8ed1ab_0    conda-forge
jupyter_client            6.1.11             pyhd8ed1ab_1    conda-forge
jupyter_console           6.2.0                      py_0    conda-forge
jupyter_core              4.7.0            py38h578d9bd_1    conda-forge
jupyter_server            1.2.2            py38h578d9bd_1    conda-forge
jupyterlab                3.0.6              pyhd8ed1ab_0    conda-forge
jupyterlab-lsp            3.2.0              pyhd8ed1ab_0    conda-forge
jupyterlab_code_formatter 1.4.2              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.1.3              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.0              pyhd8ed1ab_1    conda-forge

Description of expected behavior and the observed behavior

Because I am doing a lot of these plots I get a ton of these warnings. A first work-around would be a way to suppress them. I expect no error because all my arrays are of the same length, no column or arrays are staggered with tuples or something like that (like [arr1, (arr2, 1)]…

Use of the y2 option triggers an ndarray VisibleDeprecationWarning about ragged sequences but there are none on the user’s side, so I presume the issue with an hvplot helper routine in core/util.py.

Complete, minimal, self-contained example code that reproduces the issue

testdf = pd.DataFrame(np.random.rand(100), columns=["a"])
testdf['b'] = testdf['a']+2
testdf.hvplot.area(x='index', y='a', y2='b')

Stack traceback and/or browser JavaScript console output

/home/maye/miniconda3/envs/py38/lib/python3.8/site-packages/holoviews/core/util.py:980: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify ‘dtype=object’ when creating the ndarray arr = np.array(values)

Screenshots or screencasts of the bug in action

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
philippjfrcommented, Mar 2, 2021

v1.14.1 is old, we are tagging v1.14.2 in the next 5 mins.

0reactions
michaelayecommented, Mar 2, 2021

Sorry, should have looked at the ChangeLog.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging Numpy VisibleDeprecationWarning (ndarray from ...
I'd like to figure out which call resulted in VisibleDeprecationWarning in my own code or a call from Pandas. How would I be...
Read more >
VisibleDeprecationWarning? (Example) | Treehouse Community
I am getting this warning when I try to create the new study_minutes array: <ipython-input-81-f1dabc6571fc>:1: VisibleDeprecationW...
Read more >
Creating an ndarray from ragged nested sequences is ...
VisibleDeprecationWarning : Creating an ndarray from ragged nested sequences is deprecated ... Does anyone know why I might be getting this warning ...
Read more >
Creating an ndarray from ragged nested sequences(which is ...
Dear All,I need to create a nested array before creating a constraint in the CPLEX library. Here is the code. A = np.array([1,2,3,[1,3]]) ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found