MCPcopy Create free account
hub / github.com/Lauriat/funct / linspace

Method linspace

funct/Array.py:1054–1066  ·  view source on GitHub ↗

Returns evenly spaced Array over a specified interval. Parameters ---------- start: number stop: number num: int, optional endpoint : bool, optional

(start, stop, num=50, endpoint=True)

Source from the content-addressed store, hash-verified

1052
1053 @staticmethod
1054 def linspace(start, stop, num=50, endpoint=True):
1055 """
1056 Returns evenly spaced Array over a specified interval.
1057
1058 Parameters
1059 ----------
1060 start: number
1061 stop: number
1062 num: int, optional
1063 endpoint : bool, optional
1064 """
1065 step = (stop - start) / max(num - bool(endpoint), 1)
1066 return Array(start + step * i for i in range(num))
1067
1068 @staticmethod
1069 def logspace(start, stop, num=50, base=10, endpoint=True):

Callers 2

logspaceMethod · 0.80
testMethod · 0.80

Calls 1

ArrayClass · 0.85

Tested by 1

testMethod · 0.64