This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## NamedArray.jl | |
## (c) 2013 David A. van Leeuwen | |
## Julia type that implements a drop-in replacement of Array with named dimensions. | |
## This code is licensed under the GNU General Public License, version 2 | |
## See the file LICENSE in this distribution | |
## type definition | |
require("src/namedarraytypes.jl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ LD_DEBUG=files BUILDROOT/julia-0.2.0-1.fc19.x86_64/usr/bin/julia | |
23065: | |
23065: file=libreadline.so.6 [0]; needed by BUILDROOT/julia-0.2.0-1.fc19.x86_64/usr/bin/julia [0] | |
23065: file=libreadline.so.6 [0]; generating link map | |
23065: dynamic: 0x000000356123c6d0 base: 0x0000000000000000 size: 0x00000000002443c8 | |
23065: entry: 0x0000003561014f50 phdr: 0x0000003561000040 phnum: 7 | |
23065: | |
23065: | |
23065: file=libncurses.so.5 [0]; needed by BUILDROOT/julia-0.2.0-1.fc19.x86_64/usr/bin/julia [0] | |
23065: file=libncurses.so.5 [0]; generating link map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/deps/Makefile 2013-11-30 15:23:26.387689253 +0100 | |
+++ b/deps/Makefile 2013-12-06 17:58:34.800112867 +0100 | |
@@ -439,14 +439,11 @@ | |
UV_OBJ_TARGET = $(BUILD)/$(JL_LIBDIR)/libuv.a | |
endif | |
-libuv/configure: | |
- (cd .. && git submodule init && git submodule update) | |
-ifeq (exists, $(shell [ -d libuv/.git ] && echo exists )) | |
-libuv/config.status: libuv/.git/HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DataArrays | |
using NamedArrays | |
function table(x::PooledDataVector...; usena::Bool = false) | |
n = length(x) | |
l = [length(y) for y in x] | |
for i in 1:n | |
if l[1] != l[i] | |
error("arguments are not of the same length: $l") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test1(x::AbstractVector) | |
dims = [10] | |
a = zeros(Int, dims...) | |
for i in 1:length(x) | |
a[1] += 1 | |
end | |
a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These two functions are defined only in Julia 0.4 | |
rowvals(S::SparseMatrixCSC) = S.rowval | |
nzrange(S::SparseMatrixCSC, col::Integer) = S.colptr[col]:(S.colptr[col+1]-1) | |
# Based on the example from http://julia.readthedocs.org/en/latest/stdlib/sparse/#Base.nzrange | |
function sumsq(A::SparseMatrixCSC) | |
vals = nonzeros(A) | |
m, n = size(A) | |
count = zero(eltype(A)) | |
for i = 1:n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Array consisting of an element-wise transformation of another array | |
# Equivalent of vectorized functions | |
immutable LazyArray{T, N, A} <: AbstractArray{T, N} | |
a::A | |
fn::Function | |
args | |
end | |
LazyArray(a::AbstractArray, fn::Function, args) = LazyArray{eltype(fn(a[1], args...)), ndims(a), typeof(a)}(a, fn, args) | |
LazyArray(a::AbstractArray, fn::Function) = LazyArray(a, fn, ()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Base.<, Base.next, Base.nextind, Base.prevind, Base.colon, Base.length, Base.getindex, Base.first, Base.last, | |
Base.is_utf8_start, Base.utf8_trailing, Base.utf8_offset | |
# Simple index with string plus byte offset | |
immutable StringIndex{S<:AbstractString} | |
str::S | |
i::Int | |
end | |
<(a::StringIndex, b::StringIndex) = a.i < b.i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mock Version: 1.2.6 | |
ENTER do(['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/julia-nightlies-0.3.spec'], chrootPath='/var/lib/mock/fedora-rawhide-x86_64-mockbuilder-11174/root'shell=FalseprintOutput=Falseenv={'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'printf "\x1b]0;<mock-chroot>\x07<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}gid=135user='mockbuild'timeout=0logger=<mockbuild.trace_decorator.getLog object at 0x199bf50>uid=500) | |
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/julia-nightlies-0.3.spec'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'printf "\x1b]0;<mock-chroot>\x07<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell False | |
warning: Could not canonicalize hostname: i-00033401 | |
Building target platf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION < v"0.4-" && using Docile | |
VERSION < v"0.4-" && typealias Pair Tuple | |
@doc doc""" | |
recode!(dest::AbstractArray, source::AbstractArray, pairs::Pair...; default=Nullable()) | |
Fill `dest` with elements from `source`, replacing those matching a key of `pairs` | |
with the corresponding value. | |
For each `Pair` in `pairs`, if the element is equal to (according to `==`) or `in` the key |
OlderNewer