Returns the shape of this variable
@return Shape of the variable
352007
public long[] getShape() {
        if (variableType == VariableType.PLACEHOLDER && getArr() == null) {
            if (shape != null)
                return shape;
            else
                return new long[0];
        }

        long[] initialShape =  sameDiff.getShapeForVarName(getVarName());
        if(initialShape == null) {
            val arr = getArr();
            if(arr != null)
                return arr.shape();
        }

        return initialShape;
    }
492487
def shape(self):
        
        if self.color_buffer is not None:
            return self.color_buffer.shape[:2]  # in case its a texture
        if self.depth_buffer is not None:
            return self.depth_buffer.shape[:2]
        if self.stencil_buffer is not None:
            return self.stencil_buffer.shape[:2]
        raise RuntimeError('FrameBuffer without buffers has undefined shape')
1085824
public String getVariableSetterType() {
        final String prefix = List.class.getName();
        if (variableType.startsWith(prefix)) {
            return Collection.class.getName() + variableType.substring(prefix.length());
        } else {
            return variableType;
        }
    }
665519
public String getDescription() {
		String spacer = "";
		for (int i = 0; i < nesting; i++) spacer += spacing;
		String ret = spacer + "[" + this.getClass().getSimpleName() + " vars: [";
		ret += variableType.getSimpleName();
		ret += "] constraints: [";
		for (Class<?> c : this.constraintTypes) ret += c.getSimpleName();
		return ret + "]]";
	}
266785
private function foreachVariable() {
    if ($this->currentType === T_LIST) {
      return $this->_list();
    }
    else {
      if ($this->currentType === '&') {
        return $this->writeVariable();
      }
      else {
        return $this->variable();
      }
    }
  }
1271693
public ShapeHandler getShapeHandler() throws ShapefileException {
    ShapeHandler handler;
    switch (id) {
      case 1: case 11: case 21:
        handler = new PointHandler(this);
        break;
      case 3: case 13: case 23:
        handler = new MultiLineHandler(this);
        break;
      case 5: case 15: case 25:
        handler = new PolygonHandler(this);
        break;
      case 8: case 18: case 28:
        handler = new MultiPointHandler(this);
        break;
      default:
        handler = null;
    }
    return handler;
  }
1131778
public SDVariable var(@NonNull String name, @NonNull VariableType variableType, WeightInitScheme weightInitScheme,
                             org.nd4j.linalg.api.buffer.DataType dataType, long... shape) {
        if (variables.containsKey(name) && variables.get(name).getVariable().getArr() != null)
            throw new IllegalArgumentException("Another variable with the name " + name + " already exists.");

        if (name == null || name.length() < 1)
            name = getNewVarName();


        SDVariable ret = new SDVariable(name, variableType, this, shape, dataType, weightInitScheme);
        addVariable(ret);

        if(variableType == VariableType.PLACEHOLDER){
            setOriginalPlaceHolderShape(name, shape);
            putShapeForVarName(name, shape);
        }
        return ret;
    }
465337
def get_shape(cursor, name):
    """"""
    cursor.execute('select * from [%s]' % name)
    inds = cursor.description[-1][0][1:].split('_')
    return tuple([int(i) for i in inds])
627207
public GraphVar[] retrieveGraphVars() {
		ArrayList<GraphVar> gvars = new ArrayList<>();
		for (Variable v : getVars()) {
			if ((v.getTypeAndKind() & Variable.KIND) == GraphVar.GRAPH) {
				gvars.add((GraphVar) v);
			}
		}
		return gvars.toArray(new GraphVar[gvars.size()]);
	}
806259
@Override
  public Set<String> getVariables() {
    Set<String> variables = lhs.getVariables();
    variables.addAll(rhs.getVariables());

    return variables;
  }
195224
def shape(self, i=0):
        """"""
        shp = self.__getFileObj(self.shp)
        i = self.__restrictIndex(i)
        offset = self.__shapeIndex(i)
        if not offset:
            # Shx index not available so use the full list.
            shapes = self.shapes()
            return shapes[i]
        shp.seek(offset)
        return self.__shape()
1089300
def get_array_shape(self, key):
        """"""
        data = self.model.get_data()
        return data[key].shape
1139282
def shape(self):
        
        bf = self.copy()
        content = requests.get(bf.dataset_url).json()
        rowCount = content['status']['rowCount']
        valueCount = content['status']['valueCount']

        return (rowCount, valueCount)
277001
private AffineTransform getAlignmentTransform() {
        final int offsetX;
        switch (this.settings.getParams().getAlign()) {
            case LEFT:
                offsetX = 0;
                break;
            case RIGHT:
                offsetX = this.settings.getMaxSize().width - this.settings.getSize().width;
                break;
            case CENTER:
            default:
                offsetX = (int) Math
                        .floor(this.settings.getMaxSize().width / 2.0 - this.settings.getSize().width / 2.0);
                break;
        }

        final int offsetY;
        switch (this.settings.getParams().getVerticalAlign()) {
            case TOP:
                offsetY = 0;
                break;
            case BOTTOM:
                offsetY = this.settings.getMaxSize().height - this.settings.getSize().height;
                break;
            case MIDDLE:
            default:
                offsetY = (int) Math.floor(this.settings.getMaxSize().height / 2.0 -
                                                   this.settings.getSize().height / 2.0);
                break;
        }

        return AffineTransform.getTranslateInstance(Math.round(offsetX), Math.round(offsetY));
    }
1256475
private int getVariableSize(int variable) {
    for (int i = 0; i < neighborIndices.length; i++) {
      if (neighborIndices[i] == variable) return getDimensions()[i];
    }
    return 0;
  }
1310328
public final Set<Variable> vars() {
        if (vars == null) {
            ImmutableSet.Builder<Variable> builder = ImmutableSet.<Variable>builder().add(start());
            Variable end = end();
            if (end != null) builder.add(end);
            builder.addAll(otherVars());
            vars = builder.build();
        }

        return vars;
    }
467583
public String[] getVarTypes()
    {
    TreeSet<String> typeSet = new TreeSet<String>();
    for( Iterator<IVarDef> vars = getVarDefs(); vars.hasNext(); )
      {
      typeSet.add( vars.next().getType());
      }

    String[] types = new String[ typeSet.size()];
    typeSet.toArray( types);
    return types;
    }