Skip to content

cf.eq, tolerance and subspace #661

@JonathanGregory

Description

@JonathanGregory

Dear cf-python authors

https://ncas-cms.github.io/cf-python/function/cf.rtol.html#cf.rtol says

old = cf.rtol(1e-10)
>>> cf.rtol()
<CF Constant: 2.220446049250313e-16>
>>> cf.rtol(old)
<CF Constant: 1e-10>

I believe that those two returned stdin lines are exchanged; the first time, it should return 1e-10, the second time, the restored default value.

I suggest that it would be useful to provide atol and rtol parameters to cf.eq, and perhaps other condition functions, to set the tolerance just for that operation.

https://ncas-cms.github.io/cf-python/function/cf.eq.html#cf.eq explains the value parameter as "The query condition's value". It would be more informative to say something specific to the function, about it being the value that an equality test will use. About the obsolete exact parameter, it says "Use re.compile objects in value instead". Could you explain what this purpose would be?

In https://ncas-cms.github.io/cf-python/method/cf.Field.subspace.html#cf.Field.subspace it would be really helpful if the documentation of keyword parameters gave a link to a page which explains the construction of conditions comprehensively, and with examples. (I know there are some in the tutorial.)

Thanks for your consideration

Jonathan

Metadata

Metadata

Assignees

No one assigned

    Labels

    aggregationRerlating to metadata-based field and domain aggregationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions