Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DataFrame / Series inspect with limit: :infinity #737

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

maennchen
Copy link
Contributor

Error before change:

#Inspect.Error<
  got ArithmeticError with message:

      """
      bad argument in arithmetic expression
      """

  while inspecting:

      %{
        data: #Explorer.PolarsBackend.Series<
          shape: (100,)
          Series: 'contract_current_premium' [f64]
          [
          	42107.0
          	45028.0
          	45454.0
          	42278.0
          	40060.0
          	78537.0
          	54076.0
          	90896.0
          	135032.0
          	179491.0
          	111938.0
          	86522.0
          	…
          	62514.0
          	64914.0
          	49674.0
          	50462.0
          	186467.0
          	45424.0
          	48393.0
          	86624.0
          	113737.5819
          	43980.0
          	73177.0
          	66513.0
          	49160.0
          ]
        >,
        name: "contract_current_premium",
        __struct__: Explorer.Series,
        dtype: :float
      }

  Stacktrace:

    :erlang.+(:infinity, 1)
    (explorer 0.7.1) lib/explorer/backend/series.ex:297: Explorer.Backend.Series.inspect/5
    (explorer 0.7.1) lib/explorer/series.ex:5195: Inspect.Explorer.Series.inspect/2
    (elixir 1.15.7) lib/inspect/algebra.ex:348: Inspect.Algebra.to_doc/2
    (elixir 1.15.7) lib/io.ex:458: IO.inspect/3
    (stdlib 5.1.1) erl_eval.erl:746: :erl_eval.do_apply/7
    (elixir 1.15.7) src/elixir.erl:375: :elixir.eval_forms/4
    (elixir 1.15.7) lib/module/parallel_checker.ex:112: Module.ParallelChecker.verify/1

>

Copy link
Member

@cigrainger cigrainger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@cigrainger cigrainger merged commit f949aa9 into elixir-explorer:main Nov 15, 2023
3 checks passed
@maennchen maennchen deleted the inspect_fix branch November 15, 2023 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants