Skip to content

Commit

Permalink
use 1-based indexing for ŒṬ atom
Browse files Browse the repository at this point in the history
  • Loading branch information
dylannrees authored and DennisMitchell committed May 22, 2018
1 parent 936ea79 commit 708d842
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions jelly/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,9 +1197,9 @@ def untruth_md(indices, shape = None, upper_level = []):
shape = [max(index_zipped) for index_zipped in zip(*indices)]
upper_len = len(upper_level)
if upper_len < len(shape) - 1:
return [untruth_md(indices, shape = shape, upper_level = upper_level + [i]) for i in range(shape[upper_len] + 1)]
return [untruth_md(indices, shape = shape, upper_level = upper_level + [i + 1]) for i in range(shape[upper_len])]
else:
return [1 if (upper_level + [i] in indices) else 0 for i in range(shape[-1] + 1)]
return [1 if (upper_level + [i + 1] in indices) else 0 for i in range(shape[-1])]

def variadic_chain(chain, args):
args = list(filter(None.__ne__, args))
Expand Down Expand Up @@ -2659,14 +2659,6 @@ def zip_ragged(array):
arity = 0,
call = lambda: list(str_digit + str_upper + str_lower)
),
'ØC': attrdict(
arity = 0,
call = lambda: list('BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz')
),
'ØD': attrdict(
arity = 0,
call = lambda: list(str_digit)
),
'ØḄ': attrdict(
arity = 0,
call = lambda: list('bcdfghjklmnpqrstvwxyz')
Expand All @@ -2675,6 +2667,14 @@ def zip_ragged(array):
arity = 0,
call = lambda: list('BCDFGHJKLMNPQRSTVWXYZ')
),
'ØC': attrdict(
arity = 0,
call = lambda: list('BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz')
),
'ØD': attrdict(
arity = 0,
call = lambda: list(str_digit)
),
'ØH': attrdict(
arity = 0,
call = lambda: list(str_digit + 'ABCDEF')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name = 'jellylanguage',
version = '0.1.20',
version = '0.1.21',
packages = [
'jelly'
],
Expand Down

0 comments on commit 708d842

Please sign in to comment.