You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Charming Wu (Jira)" <ji...@apache.org> on 2023/03/21 09:07:00 UTC
[jira] [Created] (AMBARI-25900) modify Ceil/Floor Function from python2 to python3
Charming Wu created AMBARI-25900:
------------------------------------
Summary: modify Ceil/Floor Function from python2 to python3
Key: AMBARI-25900
URL: https://issues.apache.org/jira/browse/AMBARI-25900
Project: Ambari
Issue Type: Sub-task
Components: ambari-agent, ambari-server
Affects Versions: 2.7.5
Reporter: Charming Wu
In pytthon2, ceil()/floor() function work as follows:
ceil(1.2) => 2.0
floor(1.2) => 1.0
In python3, ceil() function work as follows:
ceil(1.2) => 2
floor(1.2) => 1
which means that in python2 it return a float value, in python3 it return a Integer, this feature will casue Unit Test failed.
To avoid failed unit test, I would like to make this change:
python2 : a = ceil(b)
python3 : a = float(ceil(b))
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ambari.apache.org
For additional commands, e-mail: issues-help@ambari.apache.org