• Jason Rhinelander's avatar
    Make any_container implicitly constructible from arithmetic values · 201796d9
    Jason Rhinelander authored
    This further reduces the constructors required in buffer_info/numpy by
    removing the need for the constructors that take a single size_t and
    just forward it on via an initializer_list to the container-accepting
    constructor.
    
    Unfortunately, in `array` one of the constructors runs into an ambiguity
    problem with the deprecated `array(handle, bool)` constructor (because
    both the bool constructor and the any_container constructor involve an
    implicit conversion, so neither has precedence), so a forwarding
    constructor is kept there (until the deprecated constructor is
    eventually removed).
    201796d9
numpy.h 54.1 KB