human
Can you show me a Python code to truncate float two decimals.
assistant
Here is a Python code to truncate float two decimals

import numpy as np

def truncate_float(number, decimals=2):
    """
    Truncate float number to `decimals` decimals
    """
    return round(number, decimals)

# Enter the number
number = 1.23456789

# Calling the function
print((truncate_float(number)))

#Example Output
# 1.23

#Remember to inspect code for bugs.