I’m not aware of any methods to do this, but it shouldn’t be too hard.
— John
On Sep 19, 2014, at 3:19 AM, Florian Oswald wrote:
> just wondering if anyone has a way to print for example a GLM regression
> output table to tex? I think I'm looking for something like
> [http://cran.r-project.o
What would @data([NA]) even mean?
— John
On Sep 24, 2014, at 7:12 AM, muraveill wrote:
> It looks like a bug that @data([NA]) throws an error, should an issue be
> filed ?
Here’s a supported way to do this operation.
— John
julia> using DataArrays
julia> a=@data([NA,3,5,7,NA,3,7])
7-element DataArray{Int64,1}:
NA
3
5
7
NA
3
7
julia> b = copy(a)
7-element DataArray{Int64,1}:
NA
3
5
7
NA
3
7
julia> pop!(b)
7
julia> unshift!(
Naivete isn’t a big deal. Just try to be very precise. Any literal in Julia
should produce a value V of type T.
What’s the type T that @data([NA]) would produce?
— John
On Sep 24, 2014, at 7:22 AM, muraveill wrote:
> To my naive view, a data array with cells containing ony value NA. Well, it
hat is added to it, right ?
> Then DataArray{Any,1}. Just as @data(["asdf" NA; NA 1.4]).
>
> On Wednesday, 24 September 2014 16:25:17 UTC+2, John Myles White wrote:
> Naivete isn’t a big deal. Just try to be very precise. Any literal in Julia
> should produce a value V of
eady in the file (as text), like in R one should be
> able to decide what string will be converted to NA (by default, "NA"), and
> what is converted to NaN (default "NaN").
>
> Maybe the OP wanted to use NaN instead.
>
> On Wednesday, 24 September 2014 16:32
I think this is the flight to Mars that India just finsihed.
— John
On Sep 24, 2014, at 8:04 AM, Stefan Karpinski wrote:
> I have no idea what this is about. Can you clarify?
>
> On Wed, Sep 24, 2014 at 3:47 AM, K Leo wrote:
> for the wonderful achievement with Mangalyaan!
>
> With a budget
Not that I’m aware of. I’d say the thread is probably off-topic.
— John
On Sep 24, 2014, at 8:10 AM, Stefan Karpinski wrote:
> Is there any evidence that Julia was used to accomplish that?
>
> On Wed, Sep 24, 2014 at 11:05 AM, John Myles White
> wrote:
> I think this is the
cameras from saving
> images to disk. So we were flying blind. We tried rolling back to an earlier
> version, but recent changes to Pkg meant that `pin` wasn't working either. So
> we hit the planet."
>
> "Next time, don't run master."
>
> --Tim
Would be great to submit a pull request implementing the missing funtionality.
-- John
On Sep 24, 2014, at 6:06 PM, Li Zhang wrote:
> i tried methods in base for Dequeues, but it seems some of them are not
> implemented for DataArray.
> For example:
>
> a=@data([NA,3,5,7,NA,3,7])
> b=copy(a[
There is no Row column. That's just a printing convention.
-- John
On Sep 24, 2014, at 7:20 PM, Donald Lacombe wrote:
> Jason,
>
> I appreciate the kind words and advice but the code I'm using is from
> StatsBase and there is another version in Mixed Models that looks nice as
> well. It's a
Thanks, but these days I'd say Simon Kornblith deserves the credit for what's
good about DataArrays.
-- John
On Sep 25, 2014, at 8:11 AM, Li Zhang wrote:
> I would very much like to contribute, but i am not sure if i had time, some
> projects are keeping me busy. would to look at it when i h
I just wanted to suggest that almost everyone on this mailing list should be
using Julia 0.3, not Julia 0.4. Julia 0.4 changes dramatically from day to day
and is probably not safe for most use cases.
I'd suggest the following criterion: "are you reading the comment threads for
the majority of
41 UTC-5, John Myles White escribió:
> I just wanted to suggest that almost everyone on this mailing list should be
> using Julia 0.3, not Julia 0.4. Julia 0.4 changes dramatically from day to
> day and is probably not safe for most use cases.
>
> I'd suggest the followi
Hans,
The tone of your e-mail is a little odd in my opinion. It seems to imply
distrust and even possibly anger for a project that would be substantially
better served by participating actively in the issue discussions that Tim Holy
discussed. I don't think anyone who's following 0.4's progress
ere announced? Seems a bit
> early to worry about that kind of problem a couple of months after the last
> significant release of Julia. If 0.4 isn't out by 2020 we can start to worry.
>
>
> On Sep 26, 2014, at 10:12 AM, John Myles White
> wrote:
>
>> Hans,
>
I also tried to write an additional explanation for this recently in case the
manual isn't sufficient:
http://www.johnmyleswhite.com/notebook/2014/09/06/values-vs-bindings-the-map-is-not-the-territory/
-- John
On Sep 26, 2014, at 2:01 PM, Stefan Karpinski wrote:
> x is a variable, not a valu
Matlab’s semantics are called copy-on-write. I suspect you couldn’t implement
those semantics without several months of work on a new Array type.
— John
On Sep 27, 2014, at 1:52 PM, Stephan Buchert wrote:
> Thanks for the kind explanations and references that I had missed, seems
> clear to m
Currently, the way to do this is via the GLM package (or at least its strategy
for generating design matrices), which handles indicators for you.
Lots of improvements are possible, but we need better categorical data support
at a lower level before we can work on the improvements:
https://githu
I would be careful combining element-wise function application with partial
function application. Why not use map instead?
On Wednesday, June 15, 2016 at 3:47:05 PM UTC-7, David Anthoff wrote:
>
> I just tried to use the new dot syntax for vectorising function calls in
> order to convert an arra
Specialization of higher-order functions should be much improved in Julia
0.5.
On Friday, June 17, 2016 at 1:10:24 PM UTC-7, Douglas Bates wrote:
>
> I am writing a simulation function that loops over simulating a data set
> and fitting multiple statistical models to the data. The exact form of
See the top of
http://docs.julialang.org/en/release-0.4/manual/performance-tips/
On Friday, July 1, 2016 at 7:16:10 AM UTC-7, baillot maxime wrote:
>
> Hello everyone,
>
> I am working on a Julia code which is a brutal copy of a Matlab code and
> found out that the Julia code is slower.
>
>
>
> For industry, it probably means something similar.
I really hope people in industry won't act on this date, as it is not
nearly firm enough to bet a business on. We already have people writing
blog posts about how using Julia for their startup turned out to be a
mistake; we really don't n
This seems more like a use case for static analysis that checked operations
to me. The problem IIUC isn't about the usage of high-performance code that
is unsafe, but rather that the system was nominally tested, but tested in
an imperfect way that didn't cover the failure cases. If you were rewr
This example should clarify where you're confused:
julia> typeof(ntuple(x -> 1, 1))
Tuple{Int64}
julia> typeof(ntuple(x -> 1, 2))
Tuple{Int64,Int64}
On Tuesday, August 2, 2016 at 2:34:27 PM UTC-5, mmh wrote:
>
> Care to explain in more depth? If the function is type stable i.e. it
> retu
getfield(foo, :bar)
You can iterate over the fieldnames(foo) to print things. I would avoid a
potentially wasteful conversion to a dictionary since it doesn't buy you
anything in terms of expressive power.
--John
On Monday, August 15, 2016 at 8:38:04 PM UTC-7, Lewis Lehe wrote:
>
> Hi I was
This is extremely difficult to do right, which is why we don't support it
yet.
--John
On Friday, August 19, 2016 at 9:26:19 AM UTC-7, Mirmu wrote:
>
> I am looking for generating samples from the stable Levy family with
> Distributions.jl, but I cannot find it.
> https://en.wikipedia.org/wiki/S
Unfortunately the R package is GPL, so we can't use it as a template for a
Julia implementation. But RCall will let you call that package from Julia
to get draws from those distributions, so you should be able to do what you
suggested pretty easily.
--John
On Friday, August 19, 2016 at 1:44:06
>
> May I also point out to the My settings button on your top right corner >
> My topic email subscriptions > Unsubscribe from this thread, which would've
> spared you the message.
I'm sorry, but this kind of attitude is totally unacceptable, Kevin. I've
tolerated your misuse of the mailing
Everything is pass by sharing.
But array indexing by slices creates copies. 0.5 has better support for
creating views.
--John
On Wednesday, September 7, 2016 at 5:00:00 PM UTC-7, Alexandros Fakos wrote:
>
> Hi,
>
> a=rand(10,2)
> b=rand(10)
> sort!(b) modifies b
> but sort!(a[:,1]) does not mod
Hi Andrew,
It sounds like you've got a lot of interesting ideas for improving
Distributions.jl. Please read through the existing codebase when you've got
some time and submit pull requests for any functionality you'd like to see
changed.
In regard to your main question, I don't believe we supp
FWIW, I think going after the "data analyst" community is a losing bet for
Julia until a few more years have passed. The R community contains very few
developers, so most of the R community couldn't possibly benefit from a young
language that needs develepors, not users. It's a bad relationship
> On Thu, Oct 2, 2014 at 11:28 PM, John Myles White
> wrote:
>> FWIW, I think going after the "data analyst" community is a losing bet for
>> Julia until a few more years have passed. The R community contains very few
>> developers, so most of the R community coul
me too
-- John
On Oct 2, 2014, at 8:03 AM, Stefan Karpinski wrote:
> I'm in favor of merging that branch and seeing how it goes :-)
>
>
>> On Oct 2, 2014, at 10:58 AM, David Moon wrote:
>>
>> This would not have happened with my suggested reworking of macro hygiene, I
>> think. I am not
Why not use copy!
-- John
On Oct 2, 2014, at 3:24 PM, Roy Wang wrote:
>
> This kind of routine is what I'm talking about...
>
> # copy assignment for vectors
> function copyassignment!(a::Vector,b::Vector)
> @assert length(a) == length(b)
> for n=1:length(a)
> a[n]=b[n];
>
These are very good points, but I think many of us think that Julia is
generally too young to provide guarantees of backwards compatibility until 1.0
lands. Many people have tried very hard to handle these things with deprecation
periods, but there are sometimes situations where that's not possi
Index is a data structure like a hash table that maps column names to column
indices. It's defined in DataFrames.
-- John
On Oct 6, 2014, at 8:38 AM, Florian Oswald wrote:
> Hi all,
>
> I'm currently trying to work out why I get an error when trying to load a
> dict with several dataframes
I think you're underselling (1), which provides the compiler with exactly the
kind of information it needs to generate extremely efficient code while also
providing names.
-- John
On Oct 6, 2014, at 8:44 AM, Tamas Papp wrote:
> Hi,
>
> AFAIK tuples are the recommended way to return multiple
Indexing into strings is a either a slow or a dangerous way to live one's life.
-- John
On Oct 6, 2014, at 9:05 AM, Daniel Høegh wrote:
> Would it not make sense to define replace for Int's and ranges like this?
> replace(s::String, index::Int, r) = string(s[1:index-1]) * string(r) *
> string
It's dangerous because strings aren't arrays of bytes: they're sequences of
codepoints. So you can't safely modify a string (which is part of the reason
they're immutable) without rewriting the whole string and you can't find a
character in a sequence without reading the whole sequence.
Another
FWIW, I actually think strings shouldn't define indexing at all: they should
only define iteration.
-- John
On Oct 6, 2014, at 10:10 AM, John Myles White wrote:
> It's dangerous because strings aren't arrays of bytes: they're sequences of
> codepoints. So you ca
If you know you're only dealing with ASCII, I think you're much better
operating on an array of Uint8.
-- John
On Oct 6, 2014, at 10:35 AM, Stefan Karpinski wrote:
> On Mon, Oct 6, 2014 at 1:11 PM, John Myles White
> wrote:
> FWIW, I actually think strings shouldn'
issues, 3 is cumbersome.
>
> So I am still interested in what the lightweight alternative is. So let
> me clarify the question: if I don't want to use composite types, what is
> the idiomatic way to do a lightweight named list? Tuples of tuples, or a
> Dict?
>
> Best,
>
>
On julia-dev, I've been asking questions to help me flesh out a formal policy
for representing NULL-ness as it occurs in many common situations. I think a
full FAQ entry will need to be a whole section of the manual (i.e. the section
on Nullable{T}), covering things like missing values in statis
014, at 8:44 AM, Tim Holy wrote:
> On Thursday, October 09, 2014 08:19:19 AM John Myles White wrote:
>> And the use of things like an EmptyTree type in DataStructures.jl means that
>> absence is also being represented in a type-unstable way in some packages.
>> (https://github.
When you add a new node in this representation, do you reshape to a vector,
resize the vector, then reshape to a matrix again?
-- John
On Oct 9, 2014, at 8:55 AM, Stefan Karpinski wrote:
> The self-link-is-null-link solution only works when the structure is acyclic
> (or more specifically wh
I’d suggest slices for consistency with the function mapslices.
— John
On Oct 9, 2014, at 6:15 PM, Tim Holy wrote:
> Would be great to have it clarified in the manual.
>
> I think I've brought this up before, and if there was a consensus I don't
> recall it. In my opinion, the various usages
Good point. I suppose you do slicing along axes.
— John
On Oct 9, 2014, at 7:29 PM, Stefan Karpinski wrote:
> Well, I might argue that the slices are along the axes rather than them being
> the same thing.
>
>
>> On Oct 9, 2014, at 10:05 PM, John Myles White
>> w
Use something like this:
julia> using DataFrames
julia> DataArray(Int, 10)
10-element DataArray{Int64,1}:
NA
NA
NA
NA
NA
NA
NA
NA
NA
NA
— John
On Oct 12, 2014, at 12:05 PM, Westley Hennigh wrote:
> Suppose that I want to create a new column of integers, default them all to
> "not
There’s a deeper conceptual problem here: what format is the data stored in?
There are two coherent formats involving Dict’s that can be converted:
Dict{Vector} and Vector{Dict}.
Dict{Vector} looks something like this in 0.4 notation:
input Dict(
:a => [1, 2],
:b => [2, 3]
)
Th
That package is abandoned. Use MultivariateStats instead.
— John
On Oct 19, 2014, at 9:36 AM, Stefan Karpinski
wrote:
> Looks like the package doesn't support Julia past 0.3.0, which is odd because
> 0.3.1 is a bug-fix release. Unfortunately, John is not going to be able to
> answer questio
I've started trying to write code that would allow me to take an existing
while-loop or for-loop and augment it with the ability for a user to pause the
computation and terminate it early. This is really useful in Optim, where you
might want to stop optimizing as soon as the solution hits a poin
The clean way to get that effect is via parametric types.
-- John
On Oct 22, 2014, at 9:08 AM, Cedric St-Jean wrote:
> Somewhat OT: since the JIT compiles a different function for each argument
> type combination, couldn't it compile a different type object for every field
> type combination
I didn't know that disable_sigint existed. I'll experiment with it today.
-- John
On Oct 22, 2014, at 9:09 AM, Steven G. Johnson wrote:
> Couldn't you use InterruptExceptions here (ctrl-c handlers), disabling sigint
> during the loop body so that the exception only occurs when you are ready?
#x27;t know anything about
> the type of `.field` and moreover that type can change through the course of
> a single function body. For immutables, of course, the value of a field can't
> change, nevermind its type, so you could implicitly make the type of any
> field part of the
I suspect Daniel may have thought that join adds "joining" spaces by default:
julia> length(join(("1"," ")))
2
julia> length(join(("1"," "), " "))
3
-- John
On Oct 22, 2014, at 11:05 AM, Stefan Karpinski wrote:
> The space shouldn't be and isn't removed:
>
> julia> join(("1"," "))
> "1 "
>
-1^2 == -(1^2)
-- John
On Oct 22, 2014, at 2:39 PM, nikolai.mar...@icloud.com wrote:
> Could someone please explain to me how julia handles ^ operator. I'm confused
> by this:
>
>
>
>
>
>
>
>
>
> $ julia
>_
>_ _ _(_)_ | A fresh approach to technical comp
7, 2014 8:00:04 AM UTC+5:30, John Myles White wrote:
> I am hoping that the 0.4 release of Julia will coincide with a major cleanup
> of the Data* world. I wrote up a very high level overview of my goals here:
> https://gist.github.com/johnmyleswhite/ad5305ecaa9de01e317e
>
> There’
This is a good idea. Please submit a pull request that adds link to that
section.
-- John
On Oct 23, 2014, at 6:05 AM, Ivo Balbaert wrote:
> Hi,
>
> Within some weeks the Pragmatic Programmers will publish the book: "Seven
> More Languages in Seven Weeks"
> by Bruce Tate, Fred Daoud, Jack
FWIW, I think some of us are pretty burnt out with benchmarks and the politics
involved with their "validity".
-- John
> On Oct 23, 2014, at 12:57 PM, Tony Kelman wrote:
>
> There's an open pull request on the website repository -
> https://github.com/JuliaLang/julialang.github.com/pull/132
Using globals is also potentially bad style since it means that your functions
aren't interpretable without additional context.
-- John
> On Oct 24, 2014, at 10:36 AM, Johan Sigfrids wrote:
>
> Operating on global variables in Julia is generally slower so you should
> definitely pass the arr
I’m very conservative about recommeinding Julia these days. I’d say that, as a
beginner to programming, you may find Julia to be a difficult ride. I think
you’ll find Julia quite easy to learn after you’ve already mastered Python.
— John
On Oct 24, 2014, at 9:41 AM, rtemp...@gmail.com wrote:
Have you ever used a database? A DataFrame is just a database that’s stored in
memory.
— John
On Oct 25, 2014, at 5:37 AM, Daniel Carrera wrote:
> Hello,
>
> This is a fairly naive question. I have observed for the last two years that
> many people really like data frames. R users obviously
lve the same
> types of problems as something like MySQL. I thought data frames were used in
> more science-related contexts.
>
> Cheers,
> Daniel.
>
>
> On 25 October 2014 17:27, John Myles White wrote:
> Have you ever used a database? A DataFrame is just a database t
I think you can sometimes get code review by posting a Gist to the list. This
happens a lot if you have a particular small section of code whose performance
confuses.
If you write library code you want to share with others and people are excited
about the idea behind the library, you'll basical
FWIW, I don’t think overhead is the right concept here: DataFrames and Arrays
are almost almost totally dissimilar data structures. (DataFrames are arguably
much more like Dict’s than Array’s.)
If Arrays are appropriate, use those. DataFrames are designed for use in cases
where Arrays are clear
I’ve often wished we had a Julia reading list that provided useful references
for people wanting to learn about the big ideas involved in Julia.
For understanding mutable vs. immutable types, I found this very helpful:
* http://cr.openjdk.java.net/~jrose/values/values-0.html
It takes several re
Funny, I had thought you were the person who sent that post to the mailing list
long ago.
— John
On Oct 26, 2014, at 8:29 AM, Stefan Karpinski wrote:
> On Sun, Oct 26, 2014 at 11:08 AM, John Myles White
> wrote:
> For understanding mutable vs. immutable types, I found this ver
size(m, 1) — counts _over_ rows
sum(m, 1) — sums _over_ rows
So no mixup, just a different perspective than you’re taking right now.
My best advice: discard everything you know about R while using Julia. If
you’ve used Matlab, that will be much more useful as an analogy for how Julia
works.
I think this was being done as a learning exercise, not an attempt to generate
production code.
That said, reading Julia's Base code is a great way to learn Julia.
-- John
On Oct 27, 2014, at 9:27 AM, Stefan Karpinski wrote:
> Speaking of which, what's wrong with the standard library functio
What Iain meant is that Julia Studio (except on Windows) doesn't support a
modern version of Julia.
-- John
On Oct 27, 2014, at 9:26 PM, Uwe Fechner wrote:
> I still don't understand your sentence. Perhaps you mean:
> "The read-evaluate-print loop (REPL) doesn't even come close to recent
>
Can you give an example? The default DataFrames printing should only render a
few rows, although it will render all columns by default.
-- John
On Oct 28, 2014, at 1:08 PM, Frank Davidson wrote:
> Hi,
>
> Julia newbie here... How would I stop output of a command to the REPL
> display? Can I
x of the entire scipy system if I will be switching to
> julia later.
>
> The lack of tutorials for data science in julia is the main factor I'm
> pondering now.
>
> On Saturday, October 25, 2014 11:13:43 AM UTC-4, John Myles White wrote:
> I’m very conservative abou
This is actually broken right now.
One way to do this is found in the pull request here:
https://github.com/JuliaStats/DataFrames.jl/pull/632/files
But we should probably follow Simon's suggestion in that thread and change the
definition of convert to apply to AbstractMatrix.
-- John
On Oct
My personal style rule: never use a list comprehension that's untyped. This
will solve your problems:
A = ASCIIString[fun(i) for i = 1:3]]
-- John
On Oct 29, 2014, at 10:45 AM, Zenna Tavares wrote:
> As shown in the following example, I am getting differently typed arrays
> depending on whe
I'm pretty sure this sort of thing always works since type declarations on
variables behave like convert calls:
julia> function foo()
a::Int64 = 0x01
return a
end
foo (generic function with 1 method)
julia> foo()
1
-- John
On Oct 29, 2014, at 10:50 AM, Zenna Tavares wrot
ing} = [fun(i) for i = 1:3]
> convert(Array{ASCIIString},A)
> end
>
> I thought maybe it was a weird REPL thing, but it's not.
>
> On Wednesday, October 29, 2014 1:52:01 PM UTC-4, John Myles White wrote:
> I'm pretty sure this sort of thing always works since type decla
gt; give different results
>
> function makestring(fun)
> A::Array{ASCIIString} = [fun(i) for i = 1:3]
> end
>
>
> function makestring(fun)
> A::Array{ASCIIString} = [fun(i) for i = 1:3]
> convert(Array{ASCIIString},A)
> end
>
> I thought maybe it was a weird
This is already possible.
You just need to apply const:
const size = 5_000_000
— John
On Nov 1, 2014, at 10:22 AM, Kapil wrote:
> Can we have a local variable name same as a global variable name and refer to
> them using something like scope resolution operator like in C.
>
> I am thinking
Maybe you needed a deps clean?
— John
On Nov 1, 2014, at 5:06 PM, Sean Garborg wrote:
> I upgraded OSX from Mavericks to Yosemite and ran 'brew upgrade' which
> brought a new version of gcc and friends. I'm not sure which action was to
> blame, but Julia kept looking for
> '/usr/local/lib/g
My personal preference is for code to never raise warnings if you might ever
use it in a system that has more than 10 lines of code. So I'm personally a
believer in either returning NaN without a warning (which seems a little risky)
or maintaining the current behavior, which seems wisest to me.
Hi Neil,
Julie does math the same way that all computers do math. You're probably coming
from another language where a lot of effort is invested into pretending that
computers offer a closer approximation to abstract mathematics than they
actually do. Those systems have been lying to you.
Put
This is really awesome. I'm really consistently amazed at how cool the projects
that Shashi works on are.
-- John
On Nov 5, 2014, at 9:16 AM, Viral Shah wrote:
> See @shashi's https://github.com/dcjones/Compose.jl/pull/89
>
> Teaser:
>
> This back-end lets us draw Compose and Gadfly graphi
FWIW, I think the best way to move forward with NamedArrays is to replace
NamedArrays with a parametric type Named{T} that wraps around other
AbstractArray types. That gives you both named Array and named DataArray
objects for the same cost.
-- John
On Nov 9, 2014, at 5:49 PM, Tim Holy wrote
Yes, the use of zero is an anachronism from a design in which zero was used to
have a default value for arbitrary types.
-- John
On Nov 10, 2014, at 8:22 AM, Ivar Nesje wrote:
> Basically this is an issue with DataFrames using a function in base for a
> different purpose than its documented
Unfinished FAQ about dots:
https://github.com/JuliaLang/julia/pull/8065#issuecomment-52747406
-- John
On Nov 12, 2014, at 9:14 AM, Robert DJ wrote:
> Thanks a lot - this really cleared some thing in my head!
>
> Using the dims argument as "dims..." had not occurred to me. Can you explain
>
I don't believe this is possible in Julia right now.
Which is ok in this case, since working with a KeyError is a very un-Julian way
to check for key existence. You'll want to use haskey instead.
-- John
On Nov 17, 2014, at 2:49 PM, Luthaf wrote:
> Hello !
>
> Is there a way to catch an exc
Yes, we are civilized after all.
-- John
On Nov 17, 2014, at 2:53 PM, Luthaf wrote:
> Ok, thank you !
>
> So the way to go is "better ask for permission than for forgiveness" !
>
> John Myles White a écrit :
>>
>> I don't believe this is possible
Hi Frederick,
You'll want to read a bit more about what invariance means in computer science:
http://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)
In particular, Array{S} <: Array{T} is false for all types S and T with S != T
in Julia. This isn't an inconsistency -- it'
I think the most robust way to fix this would be to embed the SHA1 of the code
source being used.
-- John
On Nov 19, 2014, at 6:04 PM, Peter Brady wrote:
> I'm using julia v0.3.2 via the fedora package manager and am running into
> problems with the very cool source code links when using `me
This does not happen on my machine. Can you give more details about your setup?
To be clear, 1/1 is a floating point number, which means that the whole idea of
doing == is dangerous. A safer comparison is the distance between the values. I
get the following:
julia> abs(44100.0 - 44099.0 * (1/1)
while merely hoping
they will work out seems like a very risky heuristic.
-- John
On Nov 20, 2014, at 12:08 AM, Steven G. Johnson wrote:
>
>
> On Wednesday, November 19, 2014 6:04:54 PM UTC-5, John Myles White wrote:
> This does not happen on my machine. Can you give more details ab
my_dict.keys isn't giving you the keys of your dictionary. It's giving you the
internal structure of a data structure.
Try keys(my_dict).
As we sometimes say, Julia isn't a dot-oriented language. Dots only give you
access to the fields of structs.
-- John
On Nov 20, 2014, at 10:35 AM, Kristi
input[:]
-- John
On Nov 20, 2014, at 12:51 PM, mfjon...@hotmail.com wrote:
> Dear list,
>
> My caller function sends several input arguments (i.e. vectors and matrices)
> to a function, but not all changes are visible once the function completes.
> It took a while to figure out the problem,
I wrote about it once to try to help people who find this confusing:
http://www.johnmyleswhite.com/notebook/2014/09/06/values-vs-bindings-the-map-is-not-the-territory/
-- John
On Nov 20, 2014, at 5:48 PM, Peter Simon wrote:
> I've seen this technique suggested several times in the news group,
>
> --Peter
>
> On Thursday, November 20, 2014 9:51:02 AM UTC-8, John Myles White wrote:
> I wrote about it once to try to help people who find this confusing:
> http://www.johnmyleswhite.com/notebook/2014/09/06/values-vs-bindings-the-map-is-not-the-territory/
>
> -- John
X[:, 3] doesn't produce a SubArray. It produces a brand new array.
-- John
On Nov 21, 2014, at 10:30 AM, Ján Dolinský wrote:
> Hello,
>
> I wanted an inplace function to write a result into a subarray as follows:
>
> X = zeros(10,5)
> fill!(X[:,3], 0.1)
>
> The X[:,3] is however not updated.
This sounds a bit like a mix of two problems:
(1) A lack of interfaces:
- a) A lack of formal interfaces, which will hopefully be addressed by
something like Traits.jl at some point.
(https://github.com/JuliaLang/julia/issues/6975)
- b) A lack of documentation for informal interfaces, such a
Yes, this is one of the most surprising things about Julia. Perhaps the time
has come to put a warning about this right at the start of a REPL session.
— John
On Nov 22, 2014, at 4:50 AM, Viral Shah wrote:
> Try putting everything in a function.
>
> http://julia.readthedocs.org/en/latest/man
Did you try running any of the individual lines? There’s a very obvious bug
where you refer to kgrid(i).
— John
On Nov 23, 2014, at 3:39 PM, Pileas wrote:
> OK, I have the following model in which I try to solve the Bellman equation
> through function iteration. However somewhere I am wrong.
301 - 400 of 919 matches
Mail list logo