Skip to content

Implement our own specific function to display an array as string #280

Open

Description

@gdementen

The problem is that we cannot pass arguments to print()

>>> arr = ndtest((2, 3)) * 0.1
>>> arr
a\b                   b0   b1   b2
 a0                  0.0  0.1  0.2
 a1  0.30000000000000004  0.4  0.5
>>> show(arr, decimals=1)
a\b   b0   b1   b2
 a0  0.0  0.1  0.2
 a1  0.3  0.4  0.5
>>> round(arr, 1)
a\b   b0   b1   b2
 a0  0.0  0.1  0.2
 a1  0.3  0.4  0.5

This would complement #274 nicely by being able to set display settings temporarily (one shot)

Activity

  1. gdementen commented on May 24, 2017

    @gdementen
    ContributorAuthor

    maybe an LArray.to_string would be better than a function?

  2. alixdamman commented on Dec 21, 2018

    @alixdamman
    Collaborator

    related to #274

  3. added this to the milestone on Dec 21, 2018
  4. modified the milestones: , on Feb 6, 2019
  5. removed this from the milestone on Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions