Skip links

  • Skip to primary navigation
  • Skip to content
  • Skip to footer
An independent mind...
  • Portfolio
  • Posts
  • Categories
  • Tags
  • About
    Francis T. O'Donovan

    Francis T. O'Donovan

    Data Science Manager at Hospital IQ – Planet discoverer, researcher, developer, geek.

    • Boston, MA
    • Website
    • Email
    • Bitbucket
    • GitHub
    • KeyBase
    • LinkedIn
    • StackOverflow
    • Twitter
    • Email

    (TIL) Numpy: Set number of decimal places using set_printoptions

    less than 1 minute read

    > import numpy as np
    > np.set_printoptions(precision=4, )
    > print(np.array([1.123456789]))
    [ 1.1235]
    

    Via laurentperrinet.github.io.

    Tags: numpy, til

    Categories: til

    Updated: October 12, 2017

    Twitter Facebook LinkedIn
    Previous Next

    Comments

    You May Also Enjoy

    (TIL) Mac: Ask user for password via GUI

    less than 1 minute read

    This function will use AppleScript to present a password entry dialog to make your scripts a little more user friendly:

    (TIL) Mac: Date and Time

    10 minute read

    List Available Timezones:

    (TIL) Mac: Restart or shutdown

    less than 1 minute read

    You can restart or shutdown from the command line:

    (TIL) Nix: Stty - sane terminal settings

    less than 1 minute read

    Restore sane shell settings, in case your shell session went insane because some script or application turned it into a garbled mess:

    • Website
    • Email
    • Bitbucket
    • GitHub
    • KeyBase
    • LinkedIn
    • StackOverflow
    • Twitter
    • Feed
    © 2021 Francis T. O'Donovan. Powered by Jekyll & Minimal Mistakes.