|
1 | 1 | Added set_params function to all Locator types |
2 | 2 | ```````````````````````````````````````````````` |
3 | 3 |
|
4 | | -This was a bug fix targeted at making the api for Locators more consistent. |
| 4 | +This was a bug fix targeted at making the api for Locators more consistent. |
5 | 5 |
|
6 | | -In the old behavior, only locators of type MaxNLocator have set_params() |
7 | | -available, causing its use on any other Locator to throw an AttributeError *( |
8 | | -aside: set_params(args) is a function that sets the parameters of a Locator |
9 | | -instance to be as specified within args)*. Since MaxNLocator itself is a |
10 | | -subtype of Locator, the fix will involve the moving of set_params()to the |
11 | | -Locator class. |
| 6 | +In the old behavior, only locators of type MaxNLocator have set_params() |
| 7 | +defined, causing its use on any other Locator to throw an AttributeError *( |
| 8 | +aside: set_params(args) is a function that sets the parameters of a Locator |
| 9 | +instance to be as specified within args)*. The fix involves moving set_params() |
| 10 | +to the Locator class such that all subtypes will have this function defined. |
12 | 11 |
|
13 | | -Since each of the Locator subtype have their own modifiable parameters, a |
14 | | -universal set_params() in Locator isn't ideal. Instead, a default no-operation |
15 | | -function that raises a warning is implemented in Locator. Subtypes extending |
16 | | -Locator will then override with their own implementations. Subtypes that do |
17 | | -not have a need for set_params() will fall back onto their parent's |
18 | | -implementation, which raises a warning as intended. |
| 12 | +Since each of the Locator subtype have their own modifiable parameters, a |
| 13 | +universal set_params() in Locator isn't ideal. Instead, a default no-operation |
| 14 | +function that raises a warning is implemented in Locator. Subtypes extending |
| 15 | +Locator will then override with their own implementations. Subtypes that do |
| 16 | +not have a need for set_params() will fall back onto their parent's |
| 17 | +implementation, which raises a warning as intended. |
19 | 18 |
|
20 | | -In the new behavior, all Locator instances will not throw an AttributeError |
21 | | -when set_param() is called. For Locators that do not implement set_params(), |
22 | | -the default implementation in Locator is used. |
| 19 | +In the new behavior, all Locator instances will not throw an AttributeError |
| 20 | +when set_param() is called. For Locators that do not implement set_params(), |
| 21 | +the default implementation in Locator is used. |
0 commit comments