Skip to content
Texxl

From junior to geek the road is sleek

Uncategorized

AttributeError: ‘float’ object has no attribute ’round’

February 10, 2022 by admin

Just change this: a = 3.56803 print(a.round(2)) to this: a = 3.56803 print(round(a, 2))

Categories Uncategorized Tags attribute, AttributeError, float, object, round

Numba njit “ZeroDivisionError: division by zero”

December 17, 2021 by admin

In a normal njit function setting error_model=”numpy” does exactly this. There are also significant speedups possible by setting this option. So: @njit(error_model=”numpy”) If you are wandering what Numba is, read more about Numba here. It’s a really cool thing, I highly recommend getting familiar with it.

Categories Python, Uncategorized Tags by, division, numba, zero, zerodivisionerror

Easy way to reshape 1D numpy arrays into 2D

October 3, 2021May 20, 2021 by admin

X = X.reshape(X.shape[0],-1)

Categories Uncategorized Leave a comment

Categories

  • C#
  • Database
    • MariaDB
    • mySQL
  • git
  • Networking
    • Linux
    • nginx
    • Windows Server
  • Python
    • Anaconda
    • Cython
    • dask
    • Machine Learning
    • Numba
    • numpy
    • Pandas
    • plotly
  • Software
  • Uncategorized
  • Wordpress

Archives

  • February 2023 (1)
  • November 2022 (1)
  • September 2022 (4)
  • June 2022 (1)
  • May 2022 (1)
  • February 2022 (4)
  • December 2021 (5)
  • November 2021 (15)
  • October 2021 (5)
  • September 2021 (1)
  • August 2021 (3)
  • July 2021 (1)
  • June 2021 (10)
  • May 2021 (8)
  • April 2021 (5)

Popular Posts:

  • How to make featured images show up on the left side from content in the blog page
  • How to extract substring with regex in Python code
  • cannot import name ‘Client’ from partially initialized module ‘dask.distributed’ (most likely due to a circular import)
  • How to disable warnings in Python
  • How to read files from Google drive with Python with PyDrive

9software.com - your one-stop software shop!

© 2023 Texxl • Built with GeneratePress