mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
pyupgrade --py37-plus **/*.py (#1654)
* pyupgrade --py37-plus **/*.py * fixup! Format Python code with psf/black push
This commit is contained in:

committed by
John Law

parent
34c808b375
commit
28419cf839
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
# encoding=utf8
|
||||
|
||||
"""
|
||||
This program calculates the nth Fibonacci number in O(log(n)).
|
||||
|
@ -40,7 +40,7 @@ def TFKMeansCluster(vectors, noofclusters):
|
||||
##First lets ensure we have a Variable vector for each centroid,
|
||||
##initialized to one of the vectors from the available data points
|
||||
centroids = [
|
||||
tf.Variable((vectors[vector_indices[i]])) for i in range(noofclusters)
|
||||
tf.Variable(vectors[vector_indices[i]]) for i in range(noofclusters)
|
||||
]
|
||||
##These nodes will assign the centroid Variables the appropriate
|
||||
##values
|
||||
|
@ -46,7 +46,7 @@ def main():
|
||||
# 30*35 35*15 15*5 5*10 10*20 20*25
|
||||
Matrix, OptimalSolution = MatrixChainOrder(array)
|
||||
|
||||
print("No. of Operation required: " + str((Matrix[1][n - 1])))
|
||||
print("No. of Operation required: " + str(Matrix[1][n - 1]))
|
||||
PrintOptimalSolution(OptimalSolution, 1, n - 1)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user