← Back to team overview

dolfin team mailing list archive

Re: sizet in Python interface

 

On Thu, Nov 22, 2012 at 07:42:48PM +0000, Garth N. Wells wrote:
> On Thu, Nov 22, 2012 at 7:19 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> > ok, so we all agree on size_t?
> >
>
> Fine with me. We might be able to have "uint" print an informative
> error message from within the SWIG interface.

Sounds good.

I initially thought we should keep "uint" as an alias for "size_t" but
it's a nonstandard typedef we invented ourselves so we might as well
get rid of it (but keep an informative error message).

--
Anders


> Garth
>
> >
> >
> > On Thu, Nov 22, 2012 at 12:59:05PM +0100, Martin Sandve Alnæs wrote:
> >>    I prefer size_t.
> >>
> >>    On 22 November 2012 12:53, Johan Hake <[1]hake.dev@xxxxxxxxx> wrote:
> >>
> >>      I have no objection to "size_t". As Garth says, it would also make
> >>      sense
> >>      to use uintp, which is the NumPy equivalent, but then we should
> >>      consider
> >>      using float_ or float64 instead of double, which is unintuitive.
> >>      Johan
> >>
> >>    On 11/22/2012 12:00 PM, Anders Logg wrote:
> >>    > On Thu, Nov 22, 2012 at 10:41:10AM +0000, Garth N. Wells wrote:
> >>    >> On Thu, Nov 22, 2012 at 10:22 AM, Anders Logg <[2]logg@xxxxxxxxx>
> >>    wrote:
> >>    >>> Why is the type called 'sizet' and not 'size_t' in the Python
> >>    >>> interface for templated MeshFunctions?
> >>    >>>
> >>    >>
> >>    >> The appropriate name was raised as a question when the changes were
> >>    >> made. It could be sizet, size_t, uintp (numpy type), uint, etc.
> >>    >
> >>    > I prefer size_t over sizet since it matches the C++ interface and
> >>    does
> >>    > not introduce yet another type.
> >>    >
> >>    >
> >>    > _______________________________________________
> >>    > Mailing list: [3]https://launchpad.net/~dolfin
> >>    > Post to     : [4]dolfin@xxxxxxxxxxxxxxxxxxx
> >>    > Unsubscribe : [5]https://launchpad.net/~dolfin
> >>    > More help   : [6]https://help.launchpad.net/ListHelp
> >>    >
> >>    _______________________________________________
> >>    Mailing list: [7]https://launchpad.net/~dolfin
> >>    Post to     : [8]dolfin@xxxxxxxxxxxxxxxxxxx
> >>    Unsubscribe : [9]https://launchpad.net/~dolfin
> >>    More help   : [10]https://help.launchpad.net/ListHelp
> >>
> >> Referenser
> >>
> >>    1. mailto:hake.dev@xxxxxxxxx
> >>    2. mailto:logg@xxxxxxxxx
> >>    3. https://launchpad.net/~dolfin
> >>    4. mailto:dolfin@xxxxxxxxxxxxxxxxxxx
> >>    5. https://launchpad.net/~dolfin
> >>    6. https://help.launchpad.net/ListHelp
> >>    7. https://launchpad.net/~dolfin
> >>    8. mailto:dolfin@xxxxxxxxxxxxxxxxxxx
> >>    9. https://launchpad.net/~dolfin
> >>   10. https://help.launchpad.net/ListHelp
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~dolfin
> > Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~dolfin
> > More help   : https://help.launchpad.net/ListHelp


References