mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Pyupgrade to python3.8 (#3616)
* Upgrade to Python 3.8 syntax
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -13,7 +13,7 @@ is made.A* also known as the algorithm with brains
|
||||
import numpy as np
|
||||
|
||||
|
||||
class Cell(object):
|
||||
class Cell:
|
||||
"""
|
||||
Class cell represents a cell in the world which have the property
|
||||
position : The position of the represented by tupleof x and y
|
||||
@@ -45,7 +45,7 @@ class Cell(object):
|
||||
print(self.position)
|
||||
|
||||
|
||||
class Gridworld(object):
|
||||
class Gridworld:
|
||||
"""
|
||||
Gridworld class represents the external world here a grid M*M
|
||||
matrix
|
||||
|
||||
@@ -251,7 +251,7 @@ def ReportGenerator(
|
||||
lambda x: np.mean(
|
||||
np.nan_to_num(
|
||||
sorted(x)[
|
||||
round((len(x) * 25 / 100)) : round(len(x) * 75 / 100)
|
||||
round(len(x) * 25 / 100) : round(len(x) * 75 / 100)
|
||||
]
|
||||
)
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user