On Fri, Jun 23, 2023 at 2:35 AM Jelle Zijlstra
wrote:
>
>
> El jue, 22 jun 2023 a las 8:22, Randolf Scholz ()
> escribió:
>
>> Dataclasses should provide a way to ignore a type hinted attributes, and
>> not consider them as fields.
>>
>> For example, some attributes might be derived during `__pos
A possible suggestion for your problem:
On strawberry-graphql we have a solution for that, by annotating the field
with "strawberry.Private"[1], like this:
@strawberry.type
class Foo:
str_attr: str
str_private_attr: Private[str]
That Private is defined as:
Private = Annotated[
One item I admire from Julia and miss in python/numpy,
I often use the power of python list comprehension to process data. This
data often needs to be converted to numpy for other operations, for example
fancy indexing. The fact that operations using comprehensions (which
produce lists) and oper
If you use Python's own arrays and generator expressions instead of list
comprehension (by just dropping the `[ ]`s),
you will get each number converted to the target type in memory as soon as
it is calculated. (It will be a full
Python float/int instance during the calculation itself, though).
Th
On Fri, Jun 23, 2023 at 12:18 PM Eric V. Smith wrote:
>
>
> On Jun 23, 2023, at 9:34 AM, Joao S. O. Bueno wrote:
>
>
>
>
> On Fri, Jun 23, 2023 at 2:35 AM Jelle Zijlstra
> wrote:
>
>>
>>
>> El jue, 22 jun 2023 a las 8:22, Randolf Scholz ()
>> escribió:
>>
>>> Dataclasses should provide a wa
I think we can do better if we use fromiter and supply the size as count:
np.fromiter ((u**2 for u in range(10)), dtype=float, count=10)
On Fri, Jun 23, 2023 at 10:39 AM Joao S. O. Bueno
wrote:
> If you use Python's own arrays and generator expressions instead of list
> comprehension (by just d
On Jun 23, 2023, at 9:34 AM, Joao S. O. Bueno wrote:On Fri, Jun 23, 2023 at 2:35 AM Jelle Zijlstra wrote:El jue, 22 jun 2023 a las 8:22, Randolf Scholz () escribió:Dataclasses should provide a way to ignore a type hinted attributes, and not co
On 6/23/2023 11:34 AM, Joao S. O. Bueno wrote:
On Fri, Jun 23, 2023 at 12:18 PM Eric V. Smith wrote:
On Jun 23, 2023, at 9:34 AM, Joao S. O. Bueno
wrote:
On Fri, Jun 23, 2023 at 2:35 AM Jelle Zijlstra
wrote:
El jue, 22 jun 2023 a las 8:22, Randolf