约 50 个结果
在新选项卡中打开链接
  1. python - What does .shape [] do in "for i in range (Y.shape [0 ...

    The shape attribute for numpy arrays returns the dimensions of the array. If Y has n rows and m columns, then Y.shape is (n,m). So Y.shape[0] is n.

  2. Difference between numpy.array shape (R, 1) and (R,)

    Shape n, expresses the shape of a 1D array with n items, and n, 1 the shape of a n-row x 1-column array. (R,) and (R,1) just add (useless) parentheses but still express respectively 1D and 2D array …

  3. What does shape[0] and shape[1] do in python? - Stack Overflow

    2018年7月21日 · In python shape[0] returns the dimension but in this code it is returning total number of set. Please can someone tell me work of shape[0] and shape[1]? Code: m_train = …

  4. python - x.shape [0] vs x [0].shape in NumPy - Stack Overflow

    2018年1月7日 · On the other hand, x.shape is a 2-tuple which represents the shape of x, which in this case is (10, 1024). x.shape[0] gives the first element in that tuple, which is 10. Here's a demo with …

  5. python - What does 'range (y.shape [1])' mean in "for i in range ...

    2021年1月29日 · I'm trying to find out how this above-mentioned piece of code works in a layman sense? for context, this code contains Numpy, Seaborn, Pandas and matplotlib. below is the line of …

  6. numpy.random - size and shape confusion - Stack Overflow

    2025年2月13日 · From numpy.random.normal size: int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is None (default), a single …

  7. Visio Master Shape Unable to Edit Data Graphic - Stack Overflow

    2025年2月28日 · Background I want to create a reusable shape in Visio (Visio 365 Desktop) with certain data attached. I created a custom Stencil in "My Shapes", right clicked it and selected "Edit S...

  8. tensorflow - raise ValueError (f"Cannot convert ' {shape}' to a shape ...

    2024年2月27日 · shape: A shape tuple (integers), not including the batch size. For instance, shape= (32,) indicates that the expected input will be batches of 32-dimensional vectors. Elements of this …

  9. PYTHON: How to resolve inhomogenous shape? - Stack Overflow

    2024年4月15日 · I am attempt to save data in a *.npy file, using np.save. But encounter this error: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 …

  10. r - Manually set shape by factor - Stack Overflow

    Plotting this you will there are factors a-e that have colours and shapes attributed to them. In my code I use scale_shape_manual to set the shapes and they are defined by sequence i.e. the order of …