mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
refactor: fix new pylint warnings
This commit is contained in:
@@ -123,11 +123,7 @@ def get_base_data_type_for_numpy_or_python_constant_data(constant_data: Any) ->
|
||||
f"Unsupported constant data of type {type(constant_data)}",
|
||||
)
|
||||
if isinstance(constant_data, (numpy.ndarray, SUPPORTED_NUMPY_DTYPES_CLASS_TYPES)):
|
||||
native_type = (
|
||||
float
|
||||
if constant_data.dtype == numpy.float32 or constant_data.dtype == numpy.float64
|
||||
else int
|
||||
)
|
||||
native_type = float if (constant_data.dtype in (numpy.float32, numpy.float64)) else int
|
||||
|
||||
min_value = native_type(constant_data.min())
|
||||
max_value = native_type(constant_data.max())
|
||||
|
||||
@@ -23,7 +23,7 @@ def _is_equivalent_to_binary_commutative(lhs: IntermediateNode, rhs: object) ->
|
||||
"""is_equivalent_to for a binary and commutative operation."""
|
||||
return (
|
||||
isinstance(rhs, lhs.__class__)
|
||||
and (lhs.inputs == rhs.inputs or lhs.inputs == rhs.inputs[::-1])
|
||||
and (lhs.inputs in (rhs.inputs, rhs.inputs[::-1]))
|
||||
and lhs.outputs == rhs.outputs
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user