Closed kraftpunk97-zz closed 5 years ago
@tejank10 Committing a second batch of fixes. Here is a summary of the notable changes...
Reordered the arguments in the signature of contains
to match it with Base.in
. contains
def of Spaces that are collections of other spaces was modified to use Base.in
.
Tried to fix the Box equality issue as discussed in #21. Two Box
Spaces with different dtype
s have been considered equal if they're Integers and either both are signed or both unsigned. Int16
Box space has been assumed to be equal to an Int8
box; reason being that they represent the same set of numbers, but using different number of bytes (UInt8(3) == UInt16(3)
evaluates to true).
@tejank10 added the requested changes. Please try to overlook the commit history mess. I ended up pushing the wrong commit to the wrong branch and that led to all kinds of trouble. Git wasn't being very nice.
Nice work, @kraftpunk97 !
This PR contains fixes for the problems I encountered while preparing the demo for my JSoC report. It fixes the following issues...
floor
was applied to thelow
fields of theBox
space, instead ofceil
. This fixes an issue where we may occasionally get an out-of-bound value for something likeBox(1.1, 3.4, Int32)
.The spaces are seldom used directly by the user. Exporting them to main API interface, which should only be for the functions that are used on a constant basis, is not the right choice. Therefore, those exports have been removed, and the environments can call them by the
using .Space
statementRemoved the export of
contains
fromSpace
module, asBase.in
has already been overloaded. to callcontains
Fixed an issue where calling the
render!()
function in:human_pane
or:rgb
mode would not display immediately in a script.Switched the order the
train
andrender_mode
arguments in the definition of themake
function. User will supply the value of therender_mode
argument in more cases than fortrain
, so train will be using its default value more often, and needs to be on the right side.