-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Description
Description
Lines 1019 to 1030 in 2f1f3b4
| def getlinearParameters(self, names=None): # 5 | |
| """ | |
| This method returns dict. The key is parameter names and value is corresponding parameter value. | |
| If *name is None then the function will return dict which contain all parameter names as key and value as corresponding values. eg., getParameters() | |
| Otherwise variable number of arguments can be passed as parameter name in string format separated by commas. eg., getParameters('paraName1', 'paraName2') | |
| """ | |
| if (names == 0): | |
| return self.linearparameters | |
| elif (isinstance(names, str)): | |
| return [self.linearparameters.get(names, "NotExist")] | |
| else: | |
| return ([self.linearparameters.get(x, "NotExist") for x in names]) |
There are several issues here:
- the name should really be
getLinearParametersto be consistent with the rest of the API, - the
names == 0check is wrong: should benames is Noneto match the default value ofnames - self.linearparameters isn't set anywhere
Expected Behavior
It should either be fully implemented, or not be part of the API at all.
Additional Context
I don't actually need to use this function at this time, I just noticed the bug while cleaning up the code.
lochel
Metadata
Metadata
Assignees
Labels
No labels