### Question:
Zeros implements Op, Operand<T> { @Endpoint @SuppressWarnings("unchecked") public static <T extends TType, U extends TNumber> Zeros<T> create(Scope scope, Operand<U> dims, DataType<T> type) { Scope zerosScope = scope.withSubScope("Zeros"); Operand<T> zero; if (type == TString.DTYPE) { zero = (Operand<T>)Constant.scalarOf(zerosScope.withName("Zero"), ""); } else { zero = Cast.create(zerosScope.withName("Zero"), Constant.scalarOf(zerosScope, 0), type); } return new Zeros<>(Fill.create(zerosScope.withName("Fill"), dims, zero)); } private  Zeros(Fill<T> fill); @Endpoint @SuppressWarnings("unchecked") static Zeros<T> create(Scope scope, Operand<U> dims, DataType<T> type); @Override Operation op(); @Override Output<T> asOutput();  }### Answer:
@Test public void createIntZeros() { try (Graph g = new Graph(); Session sess = new Session(g)) { Scope scope = new Scope(g); long[] shape = {2, 2}; Zeros<TInt32> op = Zeros.create(scope, Constant.vectorOf(scope, shape), TInt32.DTYPE); try (Tensor<TInt32> result = sess.runner().fetch(op).run().get(0).expect(TInt32.DTYPE)) { result.data().scalars().forEach(s -> assertEquals(0, s.getInt())); } } }
@Test public void operationsComposingZerosAreCorrectlyNamed() { try (Graph g = new Graph(); Session sess = new Session(g)) { Scope scope = new Scope(g); long[] shape = {2, 2}; Zeros<TFloat32> zeros = Zeros.create(scope.withSubScope("test"), Constant.vectorOf(scope, shape), TFloat32.DTYPE); List<Tensor<?>> results = sess.runner().addTarget("test/Zeros/Zero").addTarget("test/Zeros/Fill").run(); } }