Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ND4J: INDArray.getColumn on row vector returning scalar #7305

Closed
AlexDBlack opened this issue Mar 16, 2019 · 1 comment · Fixed by #7340
Closed

ND4J: INDArray.getColumn on row vector returning scalar #7305

AlexDBlack opened this issue Mar 16, 2019 · 1 comment · Fixed by #7340
Labels
Bug Bugs and problems ND4J ND4J Issues

Comments

@AlexDBlack
Copy link
Contributor

AlexDBlack commented Mar 16, 2019

    @Test
    public void temp(){
        INDArray arr = Nd4j.create(1,4);
        INDArray col = arr.getColumn(0);
        System.out.println(Arrays.toString(col.shape()));
        assertNotEquals(0, col.rank());
    }

Should return rank 2 (or 1) for consistency with the non row-vector source case.

[]

java.lang.AssertionError: Values should be different. Actual: 0
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failEquals(Assert.java:185)
	at org.junit.Assert.assertNotEquals(Assert.java:199)
	at org.junit.Assert.assertNotEquals(Assert.java:211)
	at org.nd4j.evaluation.Temp.temp(Temp.java:34)

Aha! Link: https://skymindai.aha.io/features/ND4J-123

@AlexDBlack AlexDBlack added Bug Bugs and problems ND4J ND4J Issues labels Mar 16, 2019
AlexDBlack added a commit that referenced this issue Mar 28, 2019
* Add FirstDigitTransform (Benfords law) + tests

* Javadoc, polish

* #7325 Fix SameDiff.asFlatPrint

* Refactor DataVec readers to remove hard-coded use of Files, in favor of streams

* Add StreamInputSplit (partly complete)

* More tests, fixes

* Fixes for model import test failures

* DataVec fixes after earlier changes

* Another DataVec fix

* #7355 SameDiff array reuse fix

* #7343 SameDiff method for Pad op

* #7305 Fix getColumn on row vector (returning scalar, not view)

* #7168 Empty arrays - create only once

* #7002 Remove newFormat arg/field

* #7352 MultiLayerNetwork.output(DataSetIterator) validation

* Fixes

* Small fixes

* SameDiff variables: Switch to LinkedHashMap for consitent iteration order

* Fix validation NPE for LogFileWriter

* Reduce3 fixes

* Small test fix

* Small test fix

* Fix bad test

* Small test threshold tweak

* OpProfiler fix: null x array (random ops etc)

* Fix issue with array order not matching flattening order when Nd4j.ordering() == f - Nd4j.createFromArray
@lock
Copy link

lock bot commented Apr 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Bugs and problems ND4J ND4J Issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant