By the way, if you use JuliaBox for your teaching. Don't forget to announce
it to the Julia team, so that they can get more funding to maintain it.
Disclaimer: I have no relation with the Julia team.
On Fri, Apr 15, 2016 at 8:50 PM, Daniel Carrera
np.array([a[i] for i in [1,2,4] + list(range(7,17,2))])
This works, albeit awkward. Python was not originally designed for
mathematics.
On Tue, Apr 5, 2016 at 10:40 AM, DNFwrote:
> Thanks for the suggestion, but that returns a list, not an array. Also I
> wanted a mix of arbitrary indices and
You can use list compression in python
[a[i] for i in [1,2,4,7,9] ]
On Apr 5, 2016 8:55 AM, "DNF" <> wrote:
>
> Typo, I meant to type:
>
> Python 3.5
> a[i*len(a)//n:(i+1)*len(a)//n]
>
> Julia:
> a[1+i*end÷n:(i+1)end÷n]
>
> I'm just learning Python, and must say I find indexing in Python to be
Yes, let's return to the OP. Note that what the author *really wants* is to
get the i-th potion of an array. Either integer division or 0-based alone
can't solve this problem. a[i*100/n : (i+1)*100/n] needs both features.
As Eric puts it, user-written code can be as efficient as the built-in
After `make cleanall`, the problem is solved.
Thanks! @Mauro
Wish that this IDE will be released as archive like LightTable.
On Tue, Nov 24, 2015 at 2:21 PM, Steven G. Johnson wrote:
>
>
> On Tuesday, November 24, 2015 at 8:16:39 AM UTC-5, Sisyphuss wrote:
>>
>> I didn't know the convention that _ is used as any superfluous
>> assignment. So I can write `_ = a; a = b; b = _` for integer swap?
>>
>
> Yes, but you can
I didn't know the convention that _ is used as any superfluous assignment.
So I can write `_ = a; a = b; b = _` for integer swap?
On Mon, Nov 23, 2015 at 7:28 PM, Seth wrote:
> Why not simply
>
> _, x, _, y = f()
>
> ? This seems easier to read and understand. _ is a valid variable but is
>
I was waiting for someone others to comment on it. But since no one did it,
I'll try it.
Your solution is just fine for personal use. But imagine that you are
making an application working on ObjectiveFunction. For your clients to
profit from your application, they should inherit a concrete type
Just curious about when JIT compiles the code during the runtime, at what
directory it stores?
On Mon, Nov 16, 2015 at 10:33 PM, Sheehan Olver
wrote:
> I guess if the students are limited to the pre-assigned packages all
> running on the same machine, then the cache can
I think what the community standards object is not the sexualization, but
more generally the anthropomorphism.
On Fri, Oct 9, 2015 at 12:14 AM, Stefan Karpinski
wrote:
> On Thu, Oct 8, 2015 at 10:03 PM, Carlos Pita
> wrote:
>
>> this is specially
0.4-rc1, Juno takes forever to compile a function.
On Tue, Sep 15, 2015 at 2:05 PM, Mike Innes wrote:
> Actually, I've spent some time over the last couple days updating Jewel
> etc. to work with Julia v0.4 as well as 0.3. The Juno/LT bundles will
> probably be around
`b` is a 2-dimensional array.
On Sun, Sep 20, 2015 at 9:59 PM, Jesse Johnson
wrote:
> That is part of the inconsistency I was referring to. IMO a single default
> representation for a value should be used everywhere.
>
> Further, in 0.4rc1 there seems to be another,
I mean without installation (no need of root permission).
On Thu, Sep 17, 2015 at 11:19 AM, Daniel Carrera wrote:
> What's a portable version? You mean like in a USB stick?
>
> Cheers,
> Daniel.
>
> On 17 September 2015 at 11:18, Sisyphuss wrote:
>
If the index is so important to you, you should have included an index (ID
number, city name, date, etc) for it, instead of relying on the row
number output on the fly.
On Mon, Aug 24, 2015 at 6:28 PM, Robert Smith rsmith31...@gmail.com wrote:
In my opinion, when you did `df[20:50,:]`, you
@Steven, we are not talking about the same thing. You are talking about
vectorizing the code, while I am talking about vectorizing the function.
On Fri, May 8, 2015 at 8:23 PM, Steven G. Johnson stevenj@gmail.com
wrote:
On Friday, May 8, 2015 at 12:30:57 PM UTC-4, Sisyphuss wrote:
The
@Tim, can I explicitly deactivate the inline functionality ?
On Fri, May 8, 2015 at 7:11 PM, Tim Holy tim.h...@gmail.com wrote:
Yes, function get inlined within certain limits. You can check by using
@code_typed and looking for :call expressions (@code_typed includes the
inlining pass).
We are thinking about the same thing !
On Fri, May 8, 2015 at 9:14 PM, Tomas Lycken tomas.lyc...@gmail.com wrote:
I guess the real benefit comes from being able to define f!(b, a), which
means you can save the allocation of memory for the result (by re-using
memory you have from elsewhere).
mean by vectorizing the function. Can you
explain?
On Fri, May 8, 2015 at 2:55 PM, Zheng Wendell zhengwend...@gmail.com
wrote:
@Steven, we are not talking about the same thing. You are talking about
vectorizing the code, while I am talking about vectorizing the function.
On Fri, May 8, 2015
I understand now. Thanks for you two!
On Tue, May 5, 2015 at 2:45 PM, Alex alexc...@googlemail.com wrote:
So in the example above, the type parameter is redundant. However, in the
following example, type parameter is not redundant, is it?
```
f(x::AbstractArray(Real)) !=
Thank you very much!
On Tue, May 5, 2015 at 10:40 AM, Alex alexc...@googlemail.com wrote:
You can also use `@less` and`@edit` instead of `@which`. Sometimes the
line numbers are off and you don't get the full function code though (might
have been fixed in 0.4).
Best,
Alex.
On Tuesday, 5
So in the example above, the type parameter is redundant. However, in the
following example, type parameter is not redundant, is it?
```
f(x::AbstractArray(Real)) != f{T:Real}(x::AbstractArray{T}) ?
```
On Tue, May 5, 2015 at 10:35 AM, Alex alexc...@googlemail.com wrote:
Is the type parameter
@David, your code is the same as case 4.
@Tom, no, in case 3, all *z*'s have local scope (of *for* loop), even the
*z* in function *g()*. Ref: the issue cited by @mauro
On Thu, Apr 30, 2015 at 1:15 AM, Tom Breloff t...@breloff.com wrote:
This solves the problem because z is now local to g. I
related to the design (the origin of the high
performance) of Julia, I don't think it to be easily solved.
On Thu, Apr 30, 2015 at 1:05 PM, Zheng Wendell zhengwend...@gmail.com
wrote:
@David, your code is the same as case 4.
@Tom, no, in case 3, all *z*'s have local scope (of *for* loop), even
Ah, OK. Currently, the constant-value global doesn't prevent the user to
change its value, it only gives a warning. This makes me think that it _is_
a constant-type global.
Imaging that when the constant-type global finally comes out, the behavior
of constant-value global will also change -- it
when possible since redefining
constants is often handy for reloading code during development.
On Apr 27, 2015, at 9:14 AM, Zheng Wendell zhengwend...@gmail.com wrote:
Ah, OK. Currently, the constant-value global doesn't prevent the user to
change its value, it only gives a warning. This makes
Thanks to you two!
Your responses are very clear.
On Sun, Apr 26, 2015 at 8:21 PM, Jameson Nash vtjn...@gmail.com wrote:
(of course, if you decide that you actually want git to clean up any
untracked files and get back to a pristine repository state, `clean -fdx
git reset --hard
Thanks, Patrick !
Frightened by the word unstable, I do not dare to use it anymore.
Expecting the version 0.4 to be released soon!
On Fri, Apr 24, 2015 at 3:13 PM, Patrick O'Leary patrick.ole...@gmail.com
wrote:
The master branch of the git repository is currently version 0.4-dev,
which is in
28 matches
Mail list logo